summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRajasekar Raja <rajasekarr@nvidia.com>2024-10-21 10:53:27 -0700
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2024-11-12 15:03:08 +0000
commit531a7a2d915112e10e8569cb1f063f466c4fd2e7 (patch)
tree545d1b72a3b3b7cbba5b4be272544bab0c12e314
parentc36a1c27c604fbddd8e97a52e6b5d489a07bb3f9 (diff)
bgpd: Fix for match source-protocol in route-map for redistribute cmd
A redistribute cmd can have a route-map attached to it and adding the match source-protocol to that route-map means BGP to filter which protocol routes to accept among the bunch of routes zebra is sending. Fixing this since this wasnt implemented earlier. Ticket :#4119692 Signed-off-by: Donald Sharp <sharpd@nvidia.com> Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com> (cherry picked from commit 68358c0f928eafe50c9e73b0cb6a443c03f2a33f) Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org> (cherry picked from commit f93e5aa1663d9b375e0673f4eed367f9a009fa88)
-rw-r--r--bgpd/bgp_route.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c
index 021642e7db..de97bd5f99 100644
--- a/bgpd/bgp_route.c
+++ b/bgpd/bgp_route.c
@@ -8600,6 +8600,7 @@ void bgp_redistribute_add(struct bgp *bgp, struct prefix *p,
memset(&rmap_path, 0, sizeof(rmap_path));
rmap_path.peer = bgp->peer_self;
rmap_path.attr = &attr_new;
+ rmap_path.type = type;
SET_FLAG(bgp->peer_self->rmap_type,
PEER_RMAP_TYPE_REDISTRIBUTE);