summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2020-01-03 19:03:18 +0100
committerPhilippe Guibert <philippe.guibert@6wind.com>2020-05-18 14:11:03 +0200
commitee9633ed87f0ff5da1373a42d6c044f0a682c8d3 (patch)
tree7ba9d02ce4647cd4fb1443ba8b6f484c87fa7824
parentc4d466c830083e8ba58881d7ad03a90f6baf0754 (diff)
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>
-rw-r--r--bgpd/bgp_zebra.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c
index cca3f4aaa3..b7c255f16f 100644
--- a/bgpd/bgp_zebra.c
+++ b/bgpd/bgp_zebra.c
@@ -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;
}