--- /dev/null
+name: Warn before merging if a "freeze" label exists
+
+on:
+ pull_request_target:
+ types: [synchronize, opened, reopened, labeled, unlabeled]
+
+jobs:
+ freeze_warning:
+ if: ${{ contains(github.event.*.labels.*.name, 'freeze') }}
+ name: Warn before merging if a "freeze" label exists
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check for "freeze" label
+ run: |
+ echo "Pull request is labeled as 'freeze'"
+ echo "This workflow fails so that the pull request cannot be merged."
+ exit 1
extern int cmd_banner_motd_file(const char *);
extern void cmd_banner_motd_line(const char *line);
-/* struct host global, ick */
-extern struct host host;
-
struct cmd_variable_handler {
const char *tokenname, *varname;
void (*completions)(vector out, struct cmd_token *token);
#endif
/* Forward declarations */
-extern struct zebra_dplane_ctx ctx;
+struct zebra_dplane_ctx;
extern void lua_pushzebra_dplane_ctx(lua_State *L,
const struct zebra_dplane_ctx *ctx);
extern void lua_decode_zebra_dplane_ctx(lua_State *L, int idx,
/* Library inits. */
cmd_init(1);
- host.name = strdup("test");
- host.domainname = strdup("testdomainname");
+ cmd_hostname_set("test");
+ cmd_domainname_set("testdomainname");
vty_init(master, true);
lib_cmd_init();
if (!IS_UP(gs.special))
break;
zlog_info("Phased restart: %s is now up.", gs.special->name);
- {
- struct daemon *dmn;
- for (dmn = gs.daemons; dmn; dmn = dmn->next) {
- if (dmn != gs.special)
- run_job(&dmn->restart, "start",
- gs.start_command, 1, 0);
- }
+ for (dmn = gs.daemons; dmn; dmn = dmn->next) {
+ if (dmn != gs.special)
+ run_job(&dmn->restart, "start",
+ gs.start_command, 1, 0);
}
gs.phase = PHASE_NONE;
THREAD_OFF(gs.t_phase_hanging);
prov->dp_name, prov->dp_id, in, in_q, in_max,
out, out_q, out_max);
- DPLANE_LOCK();
prov = dplane_prov_list_next(&zdplane_info.dg_providers, prov);
- DPLANE_UNLOCK();
}
return CMD_SUCCESS;
if (ctx != NULL)
break;
- DPLANE_LOCK();
prov = dplane_prov_list_next(&zdplane_info.dg_providers, prov);
- DPLANE_UNLOCK();
}
if (ctx != NULL)
counter, dplane_provider_get_name(prov));
/* Locate next provider */
- DPLANE_LOCK();
prov = dplane_prov_list_next(&zdplane_info.dg_providers, prov);
- DPLANE_UNLOCK();
}
/*
(prov->dp_start)(prov);
/* Locate next provider */
- DPLANE_LOCK();
prov = dplane_prov_list_next(&zdplane_info.dg_providers, prov);
- DPLANE_UNLOCK();
}
frr_pthread_run(zdplane_info.dg_pthread, NULL);
/* Copy labels of the resolved route and the parent resolving to it */
if (policy) {
- int i = 0;
+ int label_num = 0;
/*
* Don't push the first SID if the corresponding action in the
*/
if (!newhop->nh_label || !newhop->nh_label->num_labels
|| newhop->nh_label->label[0] == MPLS_LABEL_IMPLICIT_NULL)
- i = 1;
+ label_num = 1;
- for (; i < policy->segment_list.label_num; i++)
- labels[num_labels++] = policy->segment_list.labels[i];
+ for (; label_num < policy->segment_list.label_num; label_num++)
+ labels[num_labels++] =
+ policy->segment_list.labels[label_num];
label_type = policy->segment_list.type;
} else if (newhop->nh_label) {
for (i = 0; i < newhop->nh_label->num_labels; i++) {