]> 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>
Fri, 11 Sep 2020 16:26:23 +0000 (18:26 +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 87936f1dd6d3f47944798bf1d2dad30f3913b081..639500fafc16a37565333ee934df9cf839e905d4 100644 (file)
@@ -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;
 }