diff options
author | Maria Matejka <mq@ucw.cz> | 2022-07-13 12:02:34 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-07-13 12:02:34 +0200 |
commit | 5be34f5ab4aa0c8852db6bf19cad5e81f46640e3 (patch) | |
tree | 8a935db40e88b3e79200bc6a8b1b730ea8fe1439 /conf | |
parent | 4ec443b5c283fc4f37629bc38ef3730e0a7cc932 (diff) | |
parent | 7e9cede1fd1878fb4c00e793bccd0ca6c18ad452 (diff) |
Merge commit '7e9cede1fd1878fb4c00e793bccd0ca6c18ad452' into thread-next
Diffstat (limited to 'conf')
-rw-r--r-- | conf/conf.c | 1 | ||||
-rw-r--r-- | conf/confbase.Y | 11 | ||||
-rw-r--r-- | conf/flowspec.Y | 2 |
3 files changed, 12 insertions, 2 deletions
diff --git a/conf/conf.c b/conf/conf.c index 580a6472..17424402 100644 --- a/conf/conf.c +++ b/conf/conf.c @@ -140,6 +140,7 @@ config_parse(struct config *c) protos_preconfig(c); rt_preconfig(c); cf_parse(); + rt_postconfig(c); if (EMPTY_LIST(c->protos)) cf_error("No protocol is specified in the config file"); diff --git a/conf/confbase.Y b/conf/confbase.Y index 58890cd6..a603153c 100644 --- a/conf/confbase.Y +++ b/conf/confbase.Y @@ -111,7 +111,7 @@ CF_DECLS %type <i> expr bool pxlen4 %type <time> expr_us time %type <a> ipa -%type <net> net_ip4_ net_ip6_ net_ip6 net_ip_ net_ip net_or_ipa +%type <net> net_ip4_ net_ip4 net_ip6_ net_ip6 net_ip_ net_ip net_or_ipa %type <net_ptr> net_ net_any net_vpn4_ net_vpn6_ net_vpn_ net_roa4_ net_roa6_ net_roa_ net_ip6_sadr_ net_mpls_ %type <ad> label_stack_start label_stack @@ -307,6 +307,15 @@ net_: /* Networks - regular */ +net_ip4: + net_ip4_ + | CF_SYM_KNOWN { + if (($1->class != (SYM_CONSTANT | T_NET)) || (SYM_VAL($1).net->type != NET_IP4)) + cf_error("IPv4 network constant expected"); + $$ = * SYM_VAL($1).net; + } + ; + net_ip6: net_ip6_ | CF_SYM_KNOWN { diff --git a/conf/flowspec.Y b/conf/flowspec.Y index 56a7c5dc..dbdbdda5 100644 --- a/conf/flowspec.Y +++ b/conf/flowspec.Y @@ -142,7 +142,7 @@ flow_frag_opts: ; flow4_item: - flow_srcdst net_ip { + flow_srcdst net_ip4 { flow_builder_set_type(this_flow, $1); flow_builder4_add_pfx(this_flow, (net_addr_ip4 *) &($2)); } |