]> git.proxmox.com Git - mirror_frr.git/commit
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>
Tue, 19 Jun 2018 16:17:42 +0000 (18:17 +0200)
commita1230768e0bf24fb2e0a428f8d39dfd524c646fb
tree0aab7276ae5158025e9f3468df3325f29b360a0d
parent985aba546a42ead70c71fcc0ea6b805262d791be
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>
(cherry picked from commit e7103a9644f32a70a10be8f6372aa9084aa33c2f)
bgpd/bgpd.c
bgpd/bgpd.h
tests/bgpd/test_peer_attr.c
tests/bgpd/test_peer_attr.py