summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgp_zebra.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c
index 269dcc7cb6..e07701d42d 100644
--- a/bgpd/bgp_zebra.c
+++ b/bgpd/bgp_zebra.c
@@ -1255,12 +1255,17 @@ void bgp_zebra_announce(struct bgp_node *rn, struct prefix *p,
ifindex = mpinfo->peer->nexthop.ifp
->ifindex;
}
- if (ifindex == 0)
- continue;
+
+ if (IN6_IS_ADDR_LINKLOCAL(nexthop)) {
+ if (ifindex == 0)
+ continue;
+ } else
+ ifindex = 0;
api_nh->gate.ipv6 = *nexthop;
api_nh->ifindex = ifindex;
- api_nh->type = NEXTHOP_TYPE_IPV6_IFINDEX;
+ api_nh->type = ifindex ? NEXTHOP_TYPE_IPV6_IFINDEX
+ : NEXTHOP_TYPE_IPV6;
}
if (mpinfo->extra