]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: sanity check when updating nexthop from bgp to zebra
authorPhilippe Guibert <philippe.guibert@6wind.com>
Fri, 3 Jan 2020 18:03:18 +0000 (19:03 +0100)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Mon, 18 May 2020 12:11:03 +0000 (14:11 +0200)
nexthop may sometimes not be passed through zebra, like for onlink
messages.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
bgpd/bgp_zebra.c

index cca3f4aaa3cdd7c39198cb005c2929f412cac958..b7c255f16f0c248c297d04939f132a47161c2810 100644 (file)
@@ -1143,7 +1143,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;
 }