summaryrefslogtreecommitdiff
path: root/zebra/zebra_rib.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zebra_rib.c')
-rw-r--r--zebra/zebra_rib.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index 376425329b..d04b64b19c 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.