From: Philippe Guibert Date: Fri, 3 Jan 2020 18:03:18 +0000 (+0100) Subject: bgpd: sanity check when updating nexthop from bgp to zebra X-Git-Tag: base_7.6~545^2~7 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=c2ca3e25a625756eb33fc794de7b1504762cabc6;p=mirror%2Ffrr.git bgpd: sanity check when updating nexthop from bgp to zebra nexthop may sometimes not be passed through zebra, like for onlink messages. Signed-off-by: Philippe Guibert --- diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index 87936f1dd6..639500fafc 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -1144,7 +1144,8 @@ static bool update_ipv6nh_for_route_install(int nh_othervrf, struct bgp *nh_bgp, api_nh->ifindex = 0; } } - api_nh->gate.ipv6 = *nexthop; + if (nexthop) + api_nh->gate.ipv6 = *nexthop; return true; }