diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-06-30 20:12:59 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2019-06-30 21:30:41 +0200 |
commit | 1a2ad348f660b150265f6df759a07de8a2b6de2f (patch) | |
tree | d64846d56a79178a34e865440b3b87d970c13fd4 /proto/ospf/config.Y | |
parent | 8a68316eb96be1fecf91ca395f3321aa99997ad2 (diff) |
OSPF: Support for graceful restart
Implement OSPFv2 (RFC 3623) and OSPFv3 (RFC 5187) graceful restart,
for both restarting and helper sides. Graceful restart is initiated
by 'graceful down' command.
Diffstat (limited to 'proto/ospf/config.Y')
-rw-r--r-- | proto/ospf/config.Y | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/proto/ospf/config.Y b/proto/ospf/config.Y index 36fbd5f1..e4bacc29 100644 --- a/proto/ospf/config.Y +++ b/proto/ospf/config.Y @@ -200,6 +200,7 @@ 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(MERGE, LSA, SUPPRESSION, MULTICAST, RFC5838, VPN, PE) +CF_KEYWORDS(GRACEFUL, RESTART, AWARE, TIME) %type <ld> lsadb_args %type <i> ospf_variant ospf_af_mc nbma_eligible @@ -226,6 +227,8 @@ ospf_proto_start: proto_start ospf_variant OSPF_CFG->tick = OSPF_DEFAULT_TICK; OSPF_CFG->ospf2 = $2; OSPF_CFG->af_ext = !$2; + OSPF_CFG->gr_mode = OSPF_GR_AWARE; + OSPF_CFG->gr_time = OSPF_DEFAULT_GR_TIME; }; ospf_proto: @@ -258,6 +261,9 @@ ospf_proto_item: | RFC5838 bool { OSPF_CFG->af_ext = $2; if (!ospf_cfg_is_v3()) cf_error("RFC5838 option requires OSPFv3"); } | VPN PE bool { OSPF_CFG->vpn_pe = $3; } | STUB ROUTER bool { OSPF_CFG->stub_router = $3; } + | GRACEFUL RESTART bool { OSPF_CFG->gr_mode = $3; } + | GRACEFUL RESTART AWARE { OSPF_CFG->gr_mode = OSPF_GR_AWARE; } + | GRACEFUL RESTART TIME expr { OSPF_CFG->gr_time = $4; if (($4 < 1) || ($4 > 1800)) cf_error("Graceful restart time must be in range 1-1800"); } | ECMP bool { OSPF_CFG->ecmp = $2 ? OSPF_DEFAULT_ECMP_LIMIT : 0; } | ECMP bool LIMIT expr { OSPF_CFG->ecmp = $2 ? $4 : 0; } | MERGE EXTERNAL bool { OSPF_CFG->merge_external = $3; } |