]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Fix group overrides for AF flags/filters
authorPascal Mathis <mail@pascalmathis.com>
Sun, 27 May 2018 17:23:57 +0000 (19:23 +0200)
committerPascal Mathis <mail@pascalmathis.com>
Tue, 19 Jun 2018 16:16:24 +0000 (18:16 +0200)
The previous commit introduced very strict unit tests which check all
three involved components (config input, config output, internal data
structures) which revealed two more bugs in the peer-group override
implementation.

This commit fixes overrides for 'allowas-in <number>' and
'unsuppress-map', which both had a small mistake/typo causing those
issues.

Signed-off-by: Pascal Mathis <mail@pascalmathis.com>
(cherry picked from commit 246bb5f07a3c491fdf67572f05b4f8d4a43e6abf)

bgpd/bgpd.c

index 92b8c8523a787b72025860df303dc4209298bb82..b998023e1f9a00c4de488ea1d67cba40c71f3450 100644 (file)
@@ -5097,7 +5097,7 @@ int peer_allowas_in_set(struct peer *peer, afi_t afi, safi_t safi,
        for (ALL_LIST_ELEMENTS(peer->group->peer, node, nnode, member)) {
                /* Skip peers with overridden configuration. */
                if (CHECK_FLAG(member->af_flags_override[afi][safi],
-                              PEER_FLAG_ALLOWAS_IN_ORIGIN))
+                              PEER_FLAG_ALLOWAS_IN))
                        continue;
 
                /* Set flag and configuration on peer-group member. */
@@ -6103,7 +6103,7 @@ int peer_unsuppress_map_set(struct peer *peer, afi_t afi, safi_t safi,
         */
        for (ALL_LIST_ELEMENTS(peer->group->peer, node, nnode, member)) {
                /* Skip peers with overridden configuration. */
-               if (CHECK_FLAG(peer->filter_override[afi][safi][0],
+               if (CHECK_FLAG(member->filter_override[afi][safi][0],
                               PEER_FT_UNSUPPRESS_MAP))
                        continue;