From: Donatas Abraitis Date: Fri, 15 Mar 2024 11:49:06 +0000 (+0200) Subject: bgpd: Update default-originate route-map actual map structure X-Git-Tag: docker/10.0~12^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=51443f665a30501a3dc913bc3c0e2c4f81df7c67;p=matthieu%2Ffrr.git bgpd: Update default-originate route-map actual map structure If using with `bgp listen range ... peer-group x`, default_rmap[afi][safi] is not updated, and after the hard-reset in other side, this is flushed and never updated again without restarting the sender BGP daemon. Signed-off-by: Donatas Abraitis (cherry picked from commit 4f1e2dcd7a6616c74042657ddcec693de4f10586) --- diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index f4ebd4aa9b..d604a7aa7b 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -4460,6 +4460,13 @@ static void bgp_route_map_update_peer_group(const char *rmap_name, filter->map[direct].name) == 0)) filter->map[direct].map = map; + + if (group->conf->default_rmap[afi][safi].name && + strmatch(group->conf->default_rmap[afi][safi] + .name, + rmap_name)) + group->conf->default_rmap[afi][safi].map = + map; } if (filter->usmap.name