summaryrefslogtreecommitdiffstats
path: root/zebra/rt_netlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/rt_netlink.c')
-rw-r--r--zebra/rt_netlink.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index 4625ceab..6e22d63f 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -1638,7 +1638,7 @@ netlink_route_multipath (int cmd, struct prefix *p, struct rib *rib)
req.r.rtm_table = rib->table;
req.r.rtm_dst_len = p->prefixlen;
req.r.rtm_protocol = RTPROT_ZEBRA;
- req.r.rtm_scope = RT_SCOPE_UNIVERSE;
+ req.r.rtm_scope = RT_SCOPE_LINK;
if ((rib->flags & ZEBRA_FLAG_BLACKHOLE) || (rib->flags & ZEBRA_FLAG_REJECT))
discard = 1;
@@ -1706,6 +1706,10 @@ netlink_route_multipath (int cmd, struct prefix *p, struct rib *rib)
if (cmd == RTM_DELROUTE && !CHECK_FLAG (nexthop->flags, NEXTHOP_FLAG_FIB))
continue;
+ if (nexthop->type != NEXTHOP_TYPE_IFINDEX &&
+ nexthop->type != NEXTHOP_TYPE_IFNAME)
+ req.r.rtm_scope = RT_SCOPE_UNIVERSE;
+
nexthop_num++;
}