Skip to content

Commit

Permalink
bgpd: Fix for match source-protocol in route-map for redistribute cmd
Browse files Browse the repository at this point in the history
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 <[email protected]>

Signed-off-by: Rajasekar Raja <[email protected]>
(cherry picked from commit 68358c0)
Signed-off-by: Donatas Abraitis <[email protected]>
(cherry picked from commit f93e5aa)
  • Loading branch information
raja-rajasekar authored and mergify[bot] committed Nov 12, 2024
1 parent 930ee69 commit 718b76f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bgpd/bgp_route.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 718b76f

Please sign in to comment.