Skip to content

Commit

Permalink
Merge pull request #3162 from pguibert6WIND/vpn_route_map_issue
Browse files Browse the repository at this point in the history
bgpd: vpn route-map config should be kept, except if vrf list is on
  • Loading branch information
rwestphal committed Nov 3, 2018
2 parents fb52f65 + 8a066a7 commit 8dfa7e4
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions bgpd/bgp_vty.c
Expand Up @@ -12352,11 +12352,16 @@ void bgp_vpn_policy_config_write_afi(struct vty *vty, struct bgp *bgp,
{
int indent = 2;

if (bgp->vpn_policy[afi].rmap_name[BGP_VPN_POLICY_DIR_FROMVPN])
vty_out(vty, "%*simport vrf route-map %s\n", indent, "",
bgp->vpn_policy[afi]
if (bgp->vpn_policy[afi].rmap_name[BGP_VPN_POLICY_DIR_FROMVPN]) {
if (listcount(bgp->vpn_policy[afi].import_vrf))
vty_out(vty, "%*simport vrf route-map %s\n", indent, "",
bgp->vpn_policy[afi]
.rmap_name[BGP_VPN_POLICY_DIR_FROMVPN]);

else
vty_out(vty, "%*sroute-map vpn import %s\n", indent, "",
bgp->vpn_policy[afi]
.rmap_name[BGP_VPN_POLICY_DIR_FROMVPN]);
}
if (CHECK_FLAG(bgp->af_flags[afi][SAFI_UNICAST],
BGP_CONFIG_VRF_TO_VRF_IMPORT)
|| CHECK_FLAG(bgp->af_flags[afi][SAFI_UNICAST],
Expand Down

0 comments on commit 8dfa7e4

Please sign in to comment.