From 23c212e7f1e80a3c6b88b49918972bc28375bd51 Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Mon, 21 Dec 2015 03:27:41 +0100 Subject: Follow-up work on integration --- proto/ospf/config.Y | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'proto/ospf/config.Y') diff --git a/proto/ospf/config.Y b/proto/ospf/config.Y index e8fb7f2e..6d8fa755 100644 --- a/proto/ospf/config.Y +++ b/proto/ospf/config.Y @@ -130,21 +130,27 @@ CF_KEYWORDS(ELIGIBLE, POLL, NETWORKS, HIDDEN, VIRTUAL, CHECK, LINK, ONLY, BFD) CF_KEYWORDS(RX, BUFFER, LARGE, NORMAL, STUBNET, HIDDEN, SUMMARY, TAG, EXTERNAL) CF_KEYWORDS(WAIT, DELAY, LSADB, ECMP, LIMIT, WEIGHT, NSSA, TRANSLATOR, STABILITY) CF_KEYWORDS(GLOBAL, LSID, ROUTER, SELF, INSTANCE, REAL, NETMASK, TX, PRIORITY, LENGTH) -CF_KEYWORDS(SECONDARY, MERGE, LSA, SUPPRESSION) +CF_KEYWORDS(SECONDARY, MERGE, LSA, SUPPRESSION, OSPF2, OSPF3) %type lsadb_args -%type nbma_eligible +%type ospf_variant nbma_eligible CF_GRAMMAR CF_ADDTO(proto, ospf_proto '}' { ospf_proto_finish(); } ) -ospf_proto_start: proto_start OSPF { +ospf_variant: + OSPF { $$ = 1; } + | OSPF2 { $$ = 1; } + | OSPF3 { $$ = 0; } + ; + +ospf_proto_start: proto_start ospf_variant { this_proto = proto_config_new(&proto_ospf, $1); init_list(&OSPF_CFG->area_list); init_list(&OSPF_CFG->vlink_list); OSPF_CFG->tick = OSPF_DEFAULT_TICK; - OSPF_CFG->ospf2 = OSPF_IS_V2; + OSPF_CFG->ospf2 = $2; } ; -- cgit v1.2.3