From 718b76fc3fb77f4f4b4893c55ac17a51cfaa5f21 Mon Sep 17 00:00:00 2001 From: Rajasekar Raja Date: Mon, 21 Oct 2024 10:53:27 -0700 Subject: [PATCH] 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 Signed-off-by: Rajasekar Raja (cherry picked from commit 68358c0f928eafe50c9e73b0cb6a443c03f2a33f) Signed-off-by: Donatas Abraitis (cherry picked from commit f93e5aa1663d9b375e0673f4eed367f9a009fa88) --- bgpd/bgp_route.c | 1 + 1 file changed, 1 insertion(+) diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 4367043efe6e..1ba85adec55e 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -8669,6 +8669,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);