summaryrefslogtreecommitdiffstats
path: root/bgpd
diff options
context:
space:
mode:
authorRuss White <russ@riw.us>2023-02-07 17:40:03 +0100
committerGitHub <noreply@github.com>2023-02-07 17:40:03 +0100
commit0b1a6ca3225b45f04d34c51282ad74b3c5016d65 (patch)
tree3b1a411feee2947001add69bf60b94e3b684c08c /bgpd
parentMerge pull request #12720 from opensourcerouting/fix/ecommunity_ipv6_missing_... (diff)
parentbgpd: Add more context in logs about from where to where routes are leaked (diff)
downloadfrr-0b1a6ca3225b45f04d34c51282ad74b3c5016d65.tar.xz
frr-0b1a6ca3225b45f04d34c51282ad74b3c5016d65.zip
Merge pull request #12748 from opensourcerouting/fix/route_map_vpn_import
tests: Check if route-map vpn import basic funtionality works fine
Diffstat (limited to 'bgpd')
-rw-r--r--bgpd/bgp_mplsvpn.c17
-rw-r--r--bgpd/bgp_mplsvpn.h3
-rw-r--r--bgpd/bgp_route.c14
3 files changed, 17 insertions, 17 deletions
diff --git a/bgpd/bgp_mplsvpn.c b/bgpd/bgp_mplsvpn.c
index 288115f21..33e7d971a 100644
--- a/bgpd/bgp_mplsvpn.c
+++ b/bgpd/bgp_mplsvpn.c
@@ -1192,7 +1192,7 @@ leak_update(struct bgp *to_bgp, struct bgp_dest *bn,
if (!ecommunity_cmp(
bgp_attr_get_ecommunity(bpi->attr),
bgp_attr_get_ecommunity(new_attr))) {
- vpn_leak_to_vrf_withdraw(to_bgp, bpi);
+ vpn_leak_to_vrf_withdraw(bpi);
bgp_aggregate_decrement(to_bgp, p, bpi, afi,
safi);
bgp_path_info_delete(bn, bpi);
@@ -1722,7 +1722,7 @@ void vpn_leak_from_vrf_withdraw(struct bgp *to_bgp, /* to */
if (bpi) {
/* withdraw from looped vrfs as well */
- vpn_leak_to_vrf_withdraw(to_bgp, bpi);
+ vpn_leak_to_vrf_withdraw(bpi);
bgp_aggregate_decrement(to_bgp, p, bpi, afi, safi);
bgp_path_info_delete(bn, bpi);
@@ -1777,7 +1777,7 @@ void vpn_leak_from_vrf_withdraw_all(struct bgp *to_bgp, struct bgp *from_bgp,
zlog_debug("%s: deleting it",
__func__);
/* withdraw from leak-to vrfs as well */
- vpn_leak_to_vrf_withdraw(to_bgp, bpi);
+ vpn_leak_to_vrf_withdraw(bpi);
bgp_aggregate_decrement(
to_bgp, bgp_dest_get_prefix(bn),
bpi, afi, safi);
@@ -1873,7 +1873,10 @@ static bool vpn_leak_to_vrf_update_onevrf(struct bgp *to_bgp, /* to */
if (!vpn_leak_from_vpn_active(to_bgp, afi, &debugmsg)) {
if (debug)
- zlog_debug("%s: skipping: %s", __func__, debugmsg);
+ zlog_debug(
+ "%s: from vpn (%s) to vrf (%s), skipping: %s",
+ __func__, from_bgp->name_pretty,
+ to_bgp->name_pretty, debugmsg);
return false;
}
@@ -2115,8 +2118,7 @@ bool vpn_leak_to_vrf_update(struct bgp *from_bgp,
return leak_success;
}
-void vpn_leak_to_vrf_withdraw(struct bgp *from_bgp, /* from */
- struct bgp_path_info *path_vpn) /* route */
+void vpn_leak_to_vrf_withdraw(struct bgp_path_info *path_vpn)
{
const struct prefix *p;
afi_t afi;
@@ -2159,7 +2161,8 @@ void vpn_leak_to_vrf_withdraw(struct bgp *from_bgp, /* from */
for (ALL_LIST_ELEMENTS(bm->bgp, mnode, mnnode, bgp)) {
if (!vpn_leak_from_vpn_active(bgp, afi, &debugmsg)) {
if (debug)
- zlog_debug("%s: skipping: %s", __func__,
+ zlog_debug("%s: from %s, skipping: %s",
+ __func__, bgp->name_pretty,
debugmsg);
continue;
}
diff --git a/bgpd/bgp_mplsvpn.h b/bgpd/bgp_mplsvpn.h
index 7b57e4c75..b54476e5d 100644
--- a/bgpd/bgp_mplsvpn.h
+++ b/bgpd/bgp_mplsvpn.h
@@ -75,8 +75,7 @@ extern bool vpn_leak_to_vrf_update(struct bgp *from_bgp,
struct bgp_path_info *path_vpn,
struct prefix_rd *prd);
-extern void vpn_leak_to_vrf_withdraw(struct bgp *from_bgp,
- struct bgp_path_info *path_vpn);
+extern void vpn_leak_to_vrf_withdraw(struct bgp_path_info *path_vpn);
extern void vpn_leak_zebra_vrf_label_update(struct bgp *bgp, afi_t afi);
extern void vpn_leak_zebra_vrf_label_withdraw(struct bgp *bgp, afi_t afi);
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index 4c98ffcf0..d7ff0e3c0 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -4456,8 +4456,7 @@ void bgp_update(struct peer *peer, const struct prefix *p, uint32_t addpath_id,
bgp_evpn_unimport_route(
bgp, afi, safi, p, pi);
else /* SAFI_MPLS_VPN */
- vpn_leak_to_vrf_withdraw(bgp,
- pi);
+ vpn_leak_to_vrf_withdraw(pi);
}
}
}
@@ -4877,7 +4876,7 @@ filtered:
if ((SAFI_MPLS_VPN == safi)
&& (bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT)) {
- vpn_leak_to_vrf_withdraw(bgp, pi);
+ vpn_leak_to_vrf_withdraw(pi);
}
bgp_rib_remove(dest, pi, peer, afi, safi);
@@ -4979,7 +4978,7 @@ void bgp_withdraw(struct peer *peer, const struct prefix *p,
if ((SAFI_MPLS_VPN == safi)
&& (bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT)) {
- vpn_leak_to_vrf_withdraw(bgp, pi);
+ vpn_leak_to_vrf_withdraw(pi);
}
} else if (bgp_debug_update(peer, p, NULL, 1)) {
bgp_debug_rdpfxpath2str(afi, safi, prd, p, label, num_labels,
@@ -5419,7 +5418,7 @@ static wq_item_status bgp_clear_route_node(struct work_queue *wq, void *data)
}
if (SAFI_MPLS_VPN == safi &&
bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT) {
- vpn_leak_to_vrf_withdraw(bgp, pi);
+ vpn_leak_to_vrf_withdraw(pi);
}
bgp_rib_remove(dest, pi, peer, afi, safi);
@@ -5688,8 +5687,7 @@ void bgp_clear_stale_route(struct peer *peer, afi_t afi, safi_t safi)
BGP_ROUTE_IMPORTED &&
peer->bgp->inst_type ==
BGP_INSTANCE_TYPE_DEFAULT)
- vpn_leak_to_vrf_withdraw(
- peer->bgp, pi);
+ vpn_leak_to_vrf_withdraw(pi);
bgp_rib_remove(rm, pi, peer, afi, safi);
break;
@@ -6384,7 +6382,7 @@ static void bgp_static_withdraw_safi(struct bgp *bgp, const struct prefix *p,
#endif
if (SAFI_MPLS_VPN == safi
&& bgp->inst_type == BGP_INSTANCE_TYPE_DEFAULT) {
- vpn_leak_to_vrf_withdraw(bgp, pi);
+ vpn_leak_to_vrf_withdraw(pi);
}
bgp_aggregate_decrement(bgp, p, pi, afi, safi);
bgp_path_info_delete(dest, pi);