summaryrefslogtreecommitdiff
path: root/proto/rip/config.Y
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2015-12-21 03:27:41 +0100
committerOndrej Zajicek (work) <santiago@crfreenet.org>2015-12-21 03:33:18 +0100
commit23c212e7f1e80a3c6b88b49918972bc28375bd51 (patch)
treee2e162e5f3454ba1213435acf5980bbc4e4ed5d3 /proto/rip/config.Y
parente92a4b855f668e8ac685ad79c288ff182ebd110b (diff)
Follow-up work on integration
Diffstat (limited to 'proto/rip/config.Y')
-rw-r--r--proto/rip/config.Y13
1 files changed, 9 insertions, 4 deletions
diff --git a/proto/rip/config.Y b/proto/rip/config.Y
index 29ea7eb1..d81c42d7 100644
--- a/proto/rip/config.Y
+++ b/proto/rip/config.Y
@@ -32,24 +32,29 @@ rip_check_auth(void)
CF_DECLS
-CF_KEYWORDS(RIP, ECMP, LIMIT, WEIGHT, INFINITY, METRIC, UPDATE, TIMEOUT,
+CF_KEYWORDS(RIP, RIPNG, ECMP, LIMIT, WEIGHT, INFINITY, METRIC, UPDATE, TIMEOUT,
GARBAGE, PORT, ADDRESS, MODE, BROADCAST, MULTICAST, PASSIVE,
VERSION, SPLIT, HORIZON, POISON, REVERSE, CHECK, ZERO, TIME, BFD,
AUTHENTICATION, NONE, PLAINTEXT, CRYPTOGRAPHIC, MD5, TTL, SECURITY,
RX, TX, BUFFER, LENGTH, PRIORITY, ONLY, LINK, RIP_METRIC, RIP_TAG)
-%type <i> rip_auth
+%type <i> rip_variant rip_auth
CF_GRAMMAR
CF_ADDTO(proto, rip_proto)
-rip_proto_start: proto_start RIP
+rip_variant:
+ RIP { $$ = 1; }
+ | RIPNG { $$ = 0; }
+ ;
+
+rip_proto_start: proto_start rip_variant
{
this_proto = proto_config_new(&proto_rip, $1);
init_list(&RIP_CFG->patt_list);
- RIP_CFG->rip2 = RIP_IS_V2;
+ RIP_CFG->rip2 = $2;
RIP_CFG->infinity = RIP_DEFAULT_INFINITY;
RIP_CFG->min_timeout_time = 60;