]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: fix deconfig of conditional advertisement 8660/head
authorQuentin Young <qlyoung@nvidia.com>
Tue, 11 May 2021 20:58:38 +0000 (16:58 -0400)
committerQuentin Young <qlyoung@nvidia.com>
Tue, 11 May 2021 20:58:38 +0000 (16:58 -0400)
Deconfiguring conditional advertisement resulted in all other policy
settings on the peer getting removed due to an excessively large memset.

This also created a desync with the northbound config tree, which caused
its own set of problems...

Fix the memset to just remove the conditional advertisement config.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
bgpd/bgpd.c

index 21abfeb001a1abe51ac0979c120c6d8ce200d9cc..1778645e9cf836fb982e56a0d223602b69613e76 100644 (file)
@@ -6891,7 +6891,7 @@ static void peer_advertise_map_filter_update(struct peer *peer, afi_t afi,
 
        /* Removed advertise-map configuration */
        if (!set) {
-               memset(filter, 0, sizeof(struct bgp_filter));
+               memset(&filter->advmap, 0, sizeof(filter->advmap));
 
                /* decrement condition_filter_count delete timer if
                 * this is the last advertise-map to be removed.