diff options
author | Eugene Bogomazov <eb@qrator.net> | 2022-06-17 12:14:46 +0200 |
---|---|---|
committer | Eugene Bogomazov <eb@qrator.net> | 2022-06-17 12:14:46 +0200 |
commit | d864dd9eb182eefaa4d08717bd2837f9182956a6 (patch) | |
tree | c60b9a1f8d0d4d8a9630d0a218b265cb743e8869 /tests/bgpd | |
parent | Merge pull request #11422 from opensourcerouting/feature/autoclose_stale_issu... (diff) | |
download | frr-d864dd9eb182eefaa4d08717bd2837f9182956a6.tar.xz frr-d864dd9eb182eefaa4d08717bd2837f9182956a6.zip |
bgpd: Add RFC9234 implementation
RFC9234 is a way to establish correct connection roles (Customer/
Provider, Peer or with RS) between bgp speakers. This patch:
- Add a new configuration/terminal option to set the appropriate local
role;
- Add a mechanism for checking used roles, implemented by exchanging
the corresponding capabilities in OPEN messages;
- Add strict mode to force other party to use this feature;
- Add basic support for a new transitive optional bgp attribute - OTC
(Only to Customer);
- Add logic for default setting OTC attribute and filtering routes with
this attribute by the edge speakers, if the appropriate conditions are
met;
- Add two test stands to check role negotiation and route filtering
during role usage.
Signed-off-by: Eugene Bogomazov <eb@qrator.net>
Diffstat (limited to 'tests/bgpd')
-rw-r--r-- | tests/bgpd/test_capability.c | 29 | ||||
-rw-r--r-- | tests/bgpd/test_capability.py | 3 |
2 files changed, 32 insertions, 0 deletions
diff --git a/tests/bgpd/test_capability.c b/tests/bgpd/test_capability.c index 44d15d601..51792825d 100644 --- a/tests/bgpd/test_capability.c +++ b/tests/bgpd/test_capability.c @@ -649,6 +649,35 @@ static struct test_segment misc_segments[] = 2, SHOULD_PARSE, }, + { + "Role", + "Role capability", + { + /* hdr */ 0x9, 0x1, + 0x1, + }, + 3, + SHOULD_PARSE, + }, + { + "Role-long", + "Role capability, but too long", + { + /* hdr */ 0x9, 0x4, + 0x0, 0x0, 0x0, 0x1, + }, + 6, + SHOULD_ERR, + }, + { + "Role-empty", + "Role capability, but empty.", + { + /* hdr */ 0x9, 0x0, + }, + 2, + SHOULD_ERR, + }, {NULL, NULL, {0}, 0, 0}}; /* DYNAMIC message */ diff --git a/tests/bgpd/test_capability.py b/tests/bgpd/test_capability.py index e27519553..da9245bf0 100644 --- a/tests/bgpd/test_capability.py +++ b/tests/bgpd/test_capability.py @@ -36,6 +36,9 @@ TestCapability.okfail("ORF-empty: ORF capability, but empty.") TestCapability.okfail("AS4-empty: AS4 capability, but empty.") TestCapability.okfail("dyn-empty: Dynamic capability, but empty.") TestCapability.okfail("dyn-old: Dynamic capability (deprecated version)") +TestCapability.okfail("Role: Role capability") +TestCapability.okfail("Role-long: Role capability, but too long") +TestCapability.okfail("Role-empty: Role capability, but empty.") TestCapability.okfail("Cap-singlets: One capability per Optional-Param") TestCapability.okfail("Cap-series: Series of capability, one Optional-Param") TestCapability.okfail("AS4more: AS4 capability after other caps (singlets)") |