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 <donatas@opensourcerouting.org>
(cherry picked from commit 4f1e2dcd7a)
This commit is contained in:
Donatas Abraitis 2024-03-15 13:49:06 +02:00 committed by Mergify
parent b24011a87b
commit 1df7992d7d

View File

@ -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