From c2ca3e25a625756eb33fc794de7b1504762cabc6 Mon Sep 17 00:00:00 2001 From: Philippe Guibert Date: Fri, 3 Jan 2020 19:03:18 +0100 Subject: [PATCH] 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 --- bgpd/bgp_zebra.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- 2.39.5