]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Fix for match source-protocol in route-map for redistribute cmd 17417/head
authorRajasekar Raja <rajasekarr@nvidia.com>
Mon, 21 Oct 2024 17:53:27 +0000 (10:53 -0700)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Tue, 12 Nov 2024 15:02:54 +0000 (15:02 +0000)
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)

bgpd/bgp_route.c

index 4367043efe6e0607a8cb580c7fbe2c6f37a4c443..1ba85adec55ecc132dfe01cafd98f65a94c1d092 100644 (file)
@@ -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);