summaryrefslogtreecommitdiff
path: root/lib/command.c
diff options
context:
space:
mode:
authorPascal Mathis <mail@pascalmathis.com>2018-06-11 19:49:20 +0200
committerPascal Mathis <mail@pascalmathis.com>2018-06-14 18:55:18 +0200
commit9fb964de21c740a2e253a5527a9a037eed8c8378 (patch)
treec521eb10d8ace752964c5a74f3fd78d317564689 /lib/command.c
parent0d0ca0bb3462efc19d1f2e6d770413f78b022e74 (diff)
bgpd: Implement group-overrides for peer flags
The current implementation of peer flags (e.g. shutdown, passive, ...) only has partial support for overriding flags of a peer-group when the peer is a member. Often settings might get lost if the user toys around with the peer-group configuration, which can lead to disaster. This commit introduces the same override implementation which was previously integrated to support proper peer flag/attribute override on the address-family level. The code is very similar and the global attributes now use their separate state-arrays *flags_invert* and *flags_override*. The test suite for BGP peer attributes was extended to also check peer global attributes, so that the newly introduced changes are covered. An additional feature was added which allows to test an attribute with an *interface-peer*, which can be configured by running `neighbor IF-TEST interface`. This was introduced so that the dynamic runtime inversion of the `extended-nexthop` flag, which is only enabled by default for interface peers, can also be tested. Last but not least, two small changes have been made to the current bgpd implementation: - The command `strict-capability-match` can now also be set on a peer-group, it seems like this command slipped through while implementing peer-groups in the very past. - The macro `COND_FLAG` was introduced inside lib/zebra.h, which now allows to either set or unset a flag based on a condition. The syntax for using this macro is: `COND_FLAG(flag_variable, flag, condition)` Signed-off-by: Pascal Mathis <mail@pascalmathis.com>
Diffstat (limited to 'lib/command.c')
0 files changed, 0 insertions, 0 deletions