summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_main.c
diff options
context:
space:
mode:
authorRuss White <russ@riw.us>2018-08-17 15:16:26 +0200
committerGitHub <noreply@github.com>2018-08-17 15:16:26 +0200
commit5719a7b88d0c9309f0d9c4419ccc20e6f29761df (patch)
tree81c11b729a3a9aada7be4c3ee723a88b6bd6a5a4 /bgpd/bgp_main.c
parentMerge pull request #2858 from Jafaral/sphinx (diff)
parentbgpd: issues with vrf imports when switchd or networking restarted (diff)
downloadfrr-5719a7b88d0c9309f0d9c4419ccc20e6f29761df.tar.xz
frr-5719a7b88d0c9309f0d9c4419ccc20e6f29761df.zip
Merge pull request #2834 from dslicenc/import-vrf-fixes
bgpd: issues with vrf imports when switchd or networking restarted
Diffstat (limited to 'bgpd/bgp_main.c')
-rw-r--r--bgpd/bgp_main.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c
index 8eb1c9e25..138788194 100644
--- a/bgpd/bgp_main.c
+++ b/bgpd/bgp_main.c
@@ -277,6 +277,14 @@ static int bgp_vrf_enable(struct vrf *vrf)
bgp_instance_up(bgp);
vpn_leak_zebra_vrf_label_update(bgp, AFI_IP);
vpn_leak_zebra_vrf_label_update(bgp, AFI_IP6);
+ vpn_leak_postchange(BGP_VPN_POLICY_DIR_TOVPN, AFI_IP,
+ bgp_get_default(), bgp);
+ vpn_leak_postchange(BGP_VPN_POLICY_DIR_FROMVPN, AFI_IP,
+ bgp_get_default(), bgp);
+ vpn_leak_postchange(BGP_VPN_POLICY_DIR_TOVPN, AFI_IP6,
+ bgp_get_default(), bgp);
+ vpn_leak_postchange(BGP_VPN_POLICY_DIR_FROMVPN, AFI_IP6,
+ bgp_get_default(), bgp);
}
return 0;
@@ -298,6 +306,14 @@ static int bgp_vrf_disable(struct vrf *vrf)
vpn_leak_zebra_vrf_label_withdraw(bgp, AFI_IP);
vpn_leak_zebra_vrf_label_withdraw(bgp, AFI_IP6);
+ vpn_leak_prechange(BGP_VPN_POLICY_DIR_TOVPN, AFI_IP,
+ bgp_get_default(), bgp);
+ vpn_leak_prechange(BGP_VPN_POLICY_DIR_FROMVPN, AFI_IP,
+ bgp_get_default(), bgp);
+ vpn_leak_prechange(BGP_VPN_POLICY_DIR_TOVPN, AFI_IP6,
+ bgp_get_default(), bgp);
+ vpn_leak_prechange(BGP_VPN_POLICY_DIR_FROMVPN, AFI_IP6,
+ bgp_get_default(), bgp);
old_vrf_id = bgp->vrf_id;
bgp_handle_socket(bgp, vrf, VRF_UNKNOWN, false);