diff options
Diffstat (limited to 'zebra/zebra_rib.c')
| -rw-r--r-- | zebra/zebra_rib.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index c4c80b156b..f88e594a99 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -1000,8 +1000,24 @@ int rib_install_kernel(struct route_node *rn, struct route_entry *re, for (ALL_NEXTHOPS(re->nexthop, nexthop)) SET_FLAG(nexthop->flags, NEXTHOP_FLAG_FIB); return ret; + } else { + struct nexthop *prev; + + for (ALL_NEXTHOPS(re->nexthop, nexthop)) { + UNSET_FLAG (nexthop->flags, NEXTHOP_FLAG_DUPLICATE); + for (ALL_NEXTHOPS(re->nexthop, prev)) { + if (prev == nexthop) + break; + if (nexthop_same_firsthop (nexthop, prev)) + { + SET_FLAG (nexthop->flags, NEXTHOP_FLAG_DUPLICATE); + break; + } + } + } } + /* * Make sure we update the FPM any time we send new information to * the kernel. |
