diff options
author | vivek <vivek@cumulusnetworks.com> | 2016-07-20 04:17:38 +0200 |
---|---|---|
committer | vivek <vivek@cumulusnetworks.com> | 2016-07-20 04:17:38 +0200 |
commit | 58136de99d37b5f5d9905e43f2e385d29f751251 (patch) | |
tree | 97221a709824a605f97c580b6a852a633177920e /ospfd/ospfd.c | |
parent | Don't print empty sections as they clutter the output of show-running (diff) | |
download | frr-58136de99d37b5f5d9905e43f2e385d29f751251.tar.xz frr-58136de99d37b5f5d9905e43f2e385d29f751251.zip |
ospfd: Ensure correct handling of router-id change
Upon router-id change, one object that needs to be updated is the "nbr_self"
structure that is created to contain information about the local router and
is used during DR election, among other things. In the past, the code used to
just change the router-id field of this structure. This is actually not
sufficient - the neighbor has to be deleted and re-added into the tree. This
was fixed upstream and the fix is now available in our tree, but those changes
don't work well with prior Cumulus changes to defer updating the router-id
in the OSPF instance until other cleanup has happened.
Fixed code to update the "nbr_self" structure correctly while continuing to
defer the router_id update in the OSPF structure.
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-11861
Reviewed By: CCR-4980
Testing Done: Manual, failed test
Diffstat (limited to 'ospfd/ospfd.c')
-rw-r--r-- | ospfd/ospfd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c index ea66042f2..2034ed1db 100644 --- a/ospfd/ospfd.c +++ b/ospfd/ospfd.c @@ -124,7 +124,7 @@ ospf_router_id_update (struct ospf *ospf) * oi->nbr_self->router_id = router_id for * !(virtual | ptop) links */ - ospf_nbr_self_reset (oi); + ospf_nbr_self_reset (oi, router_id); } /* If AS-external-LSA is queued, then flush those LSAs. */ @@ -888,7 +888,7 @@ add_ospf_interface (struct interface *ifp, struct ospf_area *area, oi->type = IF_DEF_PARAMS (ifp)->type; /* Add pseudo neighbor. */ - ospf_nbr_self_reset (oi); + ospf_nbr_self_reset (oi, oi->ospf->router_id); ospf_area_add_if (oi->area, oi); @@ -1160,7 +1160,7 @@ ospf_network_run_interface (struct prefix *p, struct ospf_area *area, oi->output_cost = ospf_if_get_output_cost (oi); /* Add pseudo neighbor. */ - ospf_nbr_add_self (oi); + ospf_nbr_add_self (oi, oi->ospf->router_id); /* Relate ospf interface to ospf instance. */ oi->ospf = area->ospf; |