diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2024-03-15 13:49:06 +0200 |
|---|---|---|
| committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2024-03-19 14:26:55 +0000 |
| commit | 51443f665a30501a3dc913bc3c0e2c4f81df7c67 (patch) | |
| tree | 592c4d8b82a3b682fc45d655cc3ce812afbaacbf | |
| parent | be0b8686fa384b35a1cd8e44159d48cd19e215e6 (diff) | |
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 4f1e2dcd7a6616c74042657ddcec693de4f10586)
| -rw-r--r-- | bgpd/bgp_routemap.c | 7 |
1 files changed, 7 insertions, 0 deletions
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 |
