]> git.proxmox.com Git - mirror_frr.git/commit - bgpd/bgpd.h
bgpd: Fix AF-attribute overrides when binding peer
authorPascal Mathis <mail@pascalmathis.com>
Tue, 12 Jun 2018 15:09:49 +0000 (17:09 +0200)
committerPascal Mathis <mail@pascalmathis.com>
Thu, 14 Jun 2018 16:55:25 +0000 (18:55 +0200)
commite7103a9644f32a70a10be8f6372aa9084aa33c2f
treef58b3fba5ec70797850b690d5e8fbf72048bf75b
parent9fb964de21c740a2e253a5527a9a037eed8c8378
bgpd: Fix AF-attribute overrides when binding peer

The current implementation of the overrides for peer address-family
attributes suffered a bug, which caused all peer-specific attributes to
be lost when the peer was added to a peer-group which already had that
specific address-family active.

This commit extends the *peer_group2peer_config_copy_af* function to
respect overridden flags properly. Additionally, the arguments of the
macros *PEER_ATTR_INHERIT* and *PEER_STR_ATTR_INHERIT* have been
reordered to be more consistent and easy to read.

This commit also adds further test cases to the BGP peer attributes test
suite, so that this kind of error is being caught in future commits. The
missing AF-attribute *distribute-list* has also been added to the test
suite.

Signed-off-by: Pascal Mathis <mail@pascalmathis.com>
bgpd/bgpd.c
bgpd/bgpd.h
tests/bgpd/test_peer_attr.c
tests/bgpd/test_peer_attr.py