mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 17:51:53 +00:00
Merge commit '4c2abee74e64f64fba61aad6e2b66e3895820003' into integrated
This commit is contained in:
commit
65e13d8ea8
@ -29,6 +29,7 @@ static char *opt_list = "s:vr";
|
||||
static int verbose;
|
||||
static char *init_cmd;
|
||||
static int once;
|
||||
static int restricted;
|
||||
|
||||
static char *server_path = PATH_CONTROL_SOCKET;
|
||||
static int server_fd;
|
||||
@ -70,7 +71,7 @@ parse_args(int argc, char **argv)
|
||||
verbose++;
|
||||
break;
|
||||
case 'r':
|
||||
init_cmd = "restrict";
|
||||
restricted = 1;
|
||||
break;
|
||||
default:
|
||||
usage();
|
||||
@ -83,9 +84,6 @@ parse_args(int argc, char **argv)
|
||||
int i;
|
||||
int len = 0;
|
||||
|
||||
if (init_cmd)
|
||||
usage();
|
||||
|
||||
for (i = optind; i < argc; i++)
|
||||
len += strlen(argv[i]) + 1;
|
||||
|
||||
@ -303,6 +301,13 @@ update_state(void)
|
||||
if (nstate == cstate)
|
||||
return;
|
||||
|
||||
if (restricted)
|
||||
{
|
||||
submit_server_command("restrict");
|
||||
restricted = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (init_cmd)
|
||||
{
|
||||
/* First transition - client received hello from BIRD
|
||||
|
@ -162,7 +162,7 @@ else: {
|
||||
return ELSECOL;
|
||||
}
|
||||
|
||||
({ALPHA}{ALNUM}*|[']({ALNUM}|[-])*[']) {
|
||||
({ALPHA}{ALNUM}*|[']({ALNUM}|[-]|[\.])*[']) {
|
||||
if(*yytext == '\'') {
|
||||
yytext[yyleng-1] = 0;
|
||||
yytext++;
|
||||
|
@ -478,7 +478,7 @@ to zero to disable it. An empty <cf><m/switch/</cf> is equivalent to <cf/on/
|
||||
using <cf/show route filtered/. Note that this option does not
|
||||
work for the pipe protocol. Default: off.
|
||||
|
||||
<tag>import limit <m/number/ [action warn | block | restart | disable]</tag>
|
||||
<tag>import limit [<m/number/ | off ] [action warn | block | restart | disable]</tag>
|
||||
Specify an import route limit (a maximum number of routes
|
||||
imported from the protocol) and optionally the action to be
|
||||
taken when the limit is hit. Warn action just prints warning
|
||||
@ -486,9 +486,9 @@ to zero to disable it. An empty <cf><m/switch/</cf> is equivalent to <cf/on/
|
||||
protocol. Restart and disable actions shut the protocol down
|
||||
like appropriate commands. Disable is the default action if an
|
||||
action is not explicitly specified. Note that limits are reset
|
||||
during protocol reconfigure, reload or restart. Default: <cf/none/.
|
||||
during protocol reconfigure, reload or restart. Default: <cf/off/.
|
||||
|
||||
<tag>receive limit <m/number/ [action warn | block | restart | disable]</tag>
|
||||
<tag>receive limit [<m/number/ | off ] [action warn | block | restart | disable]</tag>
|
||||
Specify an receive route limit (a maximum number of routes
|
||||
received from the protocol and remembered). It works almost
|
||||
identically to <cf>import limit</cf> option, the only
|
||||
@ -498,9 +498,9 @@ to zero to disable it. An empty <cf><m/switch/</cf> is equivalent to <cf/on/
|
||||
receive limit is to protect routing tables from
|
||||
overflow. Import limit, on the contrary, counts accepted
|
||||
routes only and routes blocked by the limit are handled like
|
||||
filtered routes. Default: <cf/none/.
|
||||
filtered routes. Default: <cf/off/.
|
||||
|
||||
<tag>export limit <m/number/ [action warn | block | restart | disable]</tag>
|
||||
<tag>export limit [ <m/number/ | off ] [action warn | block | restart | disable]</tag>
|
||||
Specify an export route limit, works similarly to
|
||||
the <cf>import limit</cf> option, but for the routes exported
|
||||
to the protocol. This option is experimental, there are some
|
||||
@ -509,7 +509,7 @@ to zero to disable it. An empty <cf><m/switch/</cf> is equivalent to <cf/on/
|
||||
during protocol reload, exported routes counter ignores route
|
||||
blocking and block action also blocks route updates of already
|
||||
accepted routes -- and these details will probably change in
|
||||
the future. Default: <cf/none/.
|
||||
the future. Default: <cf/off/.
|
||||
|
||||
<tag>description "<m/text/"</tag> This is an optional
|
||||
description of the protocol. It is displayed as a part of the
|
||||
|
@ -223,6 +223,7 @@ limit_spec:
|
||||
l->action = $2;
|
||||
$$ = l;
|
||||
}
|
||||
| OFF { $$ = 0; }
|
||||
;
|
||||
|
||||
rtable:
|
||||
|
@ -434,7 +434,7 @@ lsadb_args:
|
||||
$$ = cfg_allocz(sizeof(struct lsadb_show_data));
|
||||
}
|
||||
| lsadb_args GLOBAL { $$ = $1; $$->scope = LSA_SCOPE_AS; }
|
||||
| lsadb_args AREA idval { $$ = $1; $$->scope = LSA_SCOPE_AREA; $$->area = $3 }
|
||||
| lsadb_args AREA idval { $$ = $1; $$->scope = LSA_SCOPE_AREA; $$->area = $3; }
|
||||
| lsadb_args LINK { $$ = $1; $$->scope = 1; /* hack, 0 is no filter */ }
|
||||
| lsadb_args TYPE NUM { $$ = $1; $$->type = $3; }
|
||||
| lsadb_args LSID idval { $$ = $1; $$->lsid = $3; }
|
||||
|
@ -290,8 +290,8 @@ radv_mult:
|
||||
;
|
||||
|
||||
radv_sensitive:
|
||||
/* empty */ { $$ = -1 }
|
||||
| SENSITIVE bool { $$ = $2 }
|
||||
/* empty */ { $$ = -1; }
|
||||
| SENSITIVE bool { $$ = $2; }
|
||||
;
|
||||
|
||||
CF_CODE
|
||||
|
@ -460,7 +460,7 @@ static_reconfigure(struct proto *p, struct proto_config *new)
|
||||
WALK_LIST(r, n->iface_routes)
|
||||
{
|
||||
struct iface *ifa;
|
||||
if (ifa = if_find_by_name(r->if_name))
|
||||
if ((ifa = if_find_by_name(r->if_name)) && (ifa->flags & IF_UP))
|
||||
static_install(p, r, ifa);
|
||||
}
|
||||
WALK_LIST(r, n->other_routes)
|
||||
|
Loading…
Reference in New Issue
Block a user