summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss White <russ@riw.us>2019-01-21 19:20:53 -0500
committerGitHub <noreply@github.com>2019-01-21 19:20:53 -0500
commit6ae84696d983e94a186f87bc8a327fcb36d16ac4 (patch)
treed0d8376c03dea94d342a860f8d18dd0b45f18b33
parente228ca1247363d548326e38590f8e9391b31b649 (diff)
parentc7d14ba67ced338049a3cdf350a3b38d421b09ad (diff)
Merge pull request #3638 from pguibert6WIND/crash_manual_config_l3vpn
bgpd: do not crash when removing ip vpn entries
-rw-r--r--bgpd/bgp_route.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index 6bce7261ae..07077dfe1f 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -5081,6 +5081,9 @@ void bgp_static_delete(struct bgp *bgp)
bgp_static =
bgp_node_get_bgp_static_info(
rm);
+ if (!bgp_static)
+ continue;
+
bgp_static_withdraw_safi(
bgp, &rm->p, AFI_IP, safi,
(struct prefix_rd *)&rn->p);
@@ -5257,8 +5260,6 @@ int bgp_static_set_safi(afi_t afi, safi_t safi, struct vty *vty,
if (!bgp_node_has_bgp_path_info_data(prn))
bgp_node_set_bgp_table_info(prn,
bgp_table_init(bgp, afi, safi));
- else
- bgp_unlock_node(prn);
table = bgp_node_get_bgp_table_info(prn);
rn = bgp_node_get(table, &p);