bgpd: write route-map to config for advertise type5 commands

We enable/disable type-5 routes by following commands:
advertise ipv4 unicast [route-map <route-map>]
advertise ipv6 commands [route-map <route-map>]
the route-map part was writtem to conf file.

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
This commit is contained in:
Mitesh Kanjariya 2018-04-10 03:02:24 -07:00 committed by Donald Sharp
parent d4f7497ebd
commit d2a0075ac2

View File

@ -4393,12 +4393,22 @@ void bgp_config_write_evpn_info(struct vty *vty, struct bgp *bgp, afi_t afi,
vty_out(vty, " advertise-default-gw\n");
if (CHECK_FLAG(bgp->af_flags[AFI_L2VPN][SAFI_EVPN],
BGP_L2VPN_EVPN_ADVERTISE_IPV4_UNICAST))
vty_out(vty, " advertise ipv4 unicast\n");
BGP_L2VPN_EVPN_ADVERTISE_IPV4_UNICAST)) {
if (bgp->adv_cmd_rmap[AFI_IP][SAFI_UNICAST].name)
vty_out(vty, " advertise ipv4 unicast route-map %s\n",
bgp->adv_cmd_rmap[AFI_IP][SAFI_UNICAST].name);
else
vty_out(vty, " advertise ipv4 unicast\n");
}
if (CHECK_FLAG(bgp->af_flags[AFI_L2VPN][SAFI_EVPN],
BGP_L2VPN_EVPN_ADVERTISE_IPV6_UNICAST))
vty_out(vty, " advertise ipv6 unicast\n");
BGP_L2VPN_EVPN_ADVERTISE_IPV6_UNICAST)) {
if (bgp->adv_cmd_rmap[AFI_IP6][SAFI_UNICAST].name)
vty_out(vty, " advertise ipv6 unicast route-map %s\n",
bgp->adv_cmd_rmap[AFI_IP6][SAFI_UNICAST].name);
else
vty_out(vty, " advertise ipv6 unicast\n");
}
if (CHECK_FLAG(bgp->af_flags[AFI_L2VPN][SAFI_EVPN],
BGP_L2VPN_EVPN_DEFAULT_ORIGINATE_IPV4))