bgpd: Fix group overrides for AF flags/filters

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>
This commit is contained in:
Pascal Mathis 2018-05-27 19:23:57 +02:00
parent 9d4f56237a
commit 246bb5f07a
No known key found for this signature in database
GPG Key ID: E208DBA7BFC9B28C

View File

@ -5166,7 +5166,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. */
@ -6172,7 +6172,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;