diff options
author | Chirag Shah <chirag@cumulusnetworks.com> | 2017-12-07 03:20:48 +0100 |
---|---|---|
committer | Chirag Shah <chirag@cumulusnetworks.com> | 2018-01-02 19:00:38 +0100 |
commit | 064d4355ca82c924ec928c67150f243f17f56139 (patch) | |
tree | 33a399b265a4668270a6a857baf46b226aaaa29d /ospf6d/ospf6_abr.c | |
parent | Merge pull request #1584 from donaldsharp/1575_fix (diff) | |
download | frr-064d4355ca82c924ec928c67150f243f17f56139.tar.xz frr-064d4355ca82c924ec928c67150f243f17f56139.zip |
ospf6d: Fix External routes ECMP
Handle RFC 2328 16.4 Calculating AS external routes with ECMP
For ASBR route, if it is learnt via new LSA and contains
different nexthop list. First lookup route in ospf6 route table
if it exists, merge nexthop list to existing and call the callback
to install into FIB (zebra). Delete created new route as it is
identical to existing entry in route table.
Ticket:CM-16139
Testing Done:
Run two ASBR with 2 ECMP paths from each
DUT neighbor receievs 4 ECMP path to a external route.
ospf6 installs all 4 ECMP path to FIB/RIB
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
Diffstat (limited to 'ospf6d/ospf6_abr.c')
-rw-r--r-- | ospf6d/ospf6_abr.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ospf6d/ospf6_abr.c b/ospf6d/ospf6_abr.c index d270b9547..884761149 100644 --- a/ospf6d/ospf6_abr.c +++ b/ospf6d/ospf6_abr.c @@ -901,6 +901,7 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa) ospf6_route_copy_nexthops(route, abr_entry); + /* (7) If the routes are identical, copy the next hops over to existing route. ospf6's route table implementation will otherwise string both routes, but keep the older one as the best route since the routes @@ -910,6 +911,12 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa) if (old && (ospf6_route_cmp(route, old) == 0)) { ospf6_route_merge_nexthops(old, route); + + if (is_debug) + zlog_debug("%s: Update route: %s nh count %u", + __PRETTY_FUNCTION__, + buf, listcount(route->nh_list)); + /* Update RIB/FIB */ if (table->hook_add) (*table->hook_add)(old); @@ -918,7 +925,8 @@ void ospf6_abr_examin_summary(struct ospf6_lsa *lsa, struct ospf6_area *oa) ospf6_route_delete(route); } else { if (is_debug) - zlog_debug("Install route: %s", buf); + zlog_debug("Install route: %s nh count %u", + buf, listcount(route->nh_list)); /* ospf6_ia_add_nw_route (table, &prefix, route); */ ospf6_route_add(route, table); } |