]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Update default-originate route-map actual map structure
authorDonatas Abraitis <donatas@opensourcerouting.org>
Fri, 15 Mar 2024 11:49:06 +0000 (13:49 +0200)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Tue, 19 Mar 2024 14:26:56 +0000 (14:26 +0000)
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)

bgpd/bgp_routemap.c

index 97447f3acd4df951e972b2ccda612a0d42f39ea7..01be332921804aef76ad1ea554c66e763e5b0004 100644 (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