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 <philippe.guibert@6wind.com>
This commit is contained in:
Philippe Guibert 2020-01-03 19:03:18 +01:00
parent c4d466c830
commit ee9633ed87

View file

@ -1143,6 +1143,7 @@ static bool update_ipv6nh_for_route_install(int nh_othervrf, struct bgp *nh_bgp,
api_nh->ifindex = 0;
}
}
if (nexthop)
api_nh->gate.ipv6 = *nexthop;
return true;