diff options
author | Olivier Dugeon <olivier.dugeon@orange.com> | 2018-01-30 16:17:54 +0100 |
---|---|---|
committer | Olivier Dugeon <olivier.dugeon@orange.com> | 2018-01-30 16:17:54 +0100 |
commit | 62c9979094a6e3a809aceeae2a97d34bf5645615 (patch) | |
tree | 88a4b5494729b9619ecf104a9c2bcf4da0c83ff9 | |
parent | OSPFd: Remove unecessary debug message (diff) | |
download | frr-62c9979094a6e3a809aceeae2a97d34bf5645615.tar.xz frr-62c9979094a6e3a809aceeae2a97d34bf5645615.zip |
OSPFd: Clean up Segment Routing patch
- ospfd/ospf_te.c: Remove unregister function and call to
ospf_delete_opaque_functab() following the introduction of
ospf_opaque_term() function in ospfd.c for ospfd termination.
- ospfd/ospf_sr.c: Set initial index value for node-msd CLI to
avaoid crash when using this command
- ospfd/ospf_ext.c: Disable call to ospf_sr_update_prefix() if
Segment Routing, thus Extended Link/Prefix, is not enable
- ospfd/ospf_opaque.c: Correct scheduling of Opaque LSA flooding
Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
-rw-r--r-- | ospfd/ospf_ext.c | 3 | ||||
-rw-r--r-- | ospfd/ospf_opaque.c | 2 | ||||
-rw-r--r-- | ospfd/ospf_sr.c | 2 | ||||
-rw-r--r-- | ospfd/ospf_te.c | 23 |
4 files changed, 4 insertions, 26 deletions
diff --git a/ospfd/ospf_ext.c b/ospfd/ospf_ext.c index 90a48cc7a..474f173cb 100644 --- a/ospfd/ospf_ext.c +++ b/ospfd/ospf_ext.c @@ -622,7 +622,8 @@ static void ospf_ext_pref_ism_change(struct ospf_interface *oi, int old_status) oi->ifp->name); /* Complete SRDB if the interface belongs to a Prefix */ - ospf_sr_update_prefix(oi->ifp, oi->address); + if (OspfEXT.enabled) + ospf_sr_update_prefix(oi->ifp, oi->address); } } diff --git a/ospfd/ospf_opaque.c b/ospfd/ospf_opaque.c index 986c202d8..216492781 100644 --- a/ospfd/ospf_opaque.c +++ b/ospfd/ospf_opaque.c @@ -1780,7 +1780,7 @@ void ospf_opaque_lsa_reoriginate_schedule(void *lsa_type_dependent, lsa_type, delay, GET_OPAQUE_TYPE(ntohl(lsa->data->id.s_addr))); - OSPF_OPAQUE_TIMER_ON(oipt->t_opaque_lsa_self, func, oipt, delay * 1000); + OSPF_OPAQUE_TIMER_ON(oipt->t_opaque_lsa_self, func, oipt, delay); out: return; diff --git a/ospfd/ospf_sr.c b/ospfd/ospf_sr.c index 3397ed7c0..43f5d0e0b 100644 --- a/ospfd/ospf_sr.c +++ b/ospfd/ospf_sr.c @@ -1873,7 +1873,7 @@ DEFUN (sr_node_msd, "Maximum number of label that could be stack (1-16)\n") { uint32_t msd; - int idx; + int idx = 1; if (!ospf_sr_enabled(vty)) return CMD_WARNING_CONFIG_FAILED; diff --git a/ospfd/ospf_te.c b/ospfd/ospf_te.c index 253b272df..e11e89346 100644 --- a/ospfd/ospf_te.c +++ b/ospfd/ospf_te.c @@ -147,32 +147,12 @@ static int ospf_mpls_te_register(enum inter_as_mode mode) return rc; } -static int ospf_mpls_te_unregister() -{ - u_int8_t scope; - - if (OspfMplsTE.inter_as == Off) - return 0; - - if (OspfMplsTE.inter_as == AS) - scope = OSPF_OPAQUE_AS_LSA; - else - scope = OSPF_OPAQUE_AREA_LSA; - - ospf_delete_opaque_functab(scope, OPAQUE_TYPE_INTER_AS_LSA); - - return 0; -} - void ospf_mpls_te_term(void) { list_delete_and_null(&OspfMplsTE.iflist); - ospf_delete_opaque_functab(OSPF_OPAQUE_AREA_LSA, - OPAQUE_TYPE_TRAFFIC_ENGINEERING_LSA); OspfMplsTE.enabled = false; - ospf_mpls_te_unregister(); OspfMplsTE.inter_as = Off; return; @@ -2412,9 +2392,6 @@ DEFUN (no_ospf_mpls_te_inter_as, ospf_mpls_te_lsa_schedule(lp, FLUSH_THIS_LSA); } - /* Deregister the Callbacks for Inter-AS suport */ - ospf_mpls_te_unregister(); - return CMD_SUCCESS; } |