From 90254e7bc2ff70218f89df1211eb6e3df98b97e6 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Tue, 16 Jan 2024 16:28:41 +0200 Subject: [PATCH] tests: Adopt tests for AS4 handling When received malformed AS4 capability, it should return -1 (notification send), and the received flag SHOULD NOT be set. Signed-off-by: Donatas Abraitis --- tests/bgpd/test_aspath.c | 10 +++++----- tests/bgpd/test_capability.c | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/bgpd/test_aspath.c b/tests/bgpd/test_aspath.c index 799733b7b53c..29d2e4cf6e29 100644 --- a/tests/bgpd/test_aspath.c +++ b/tests/bgpd/test_aspath.c @@ -653,7 +653,7 @@ static struct aspath_tests { "8466 3 52737 4096", AS4_DATA, -1, - PEER_CAP_AS4_RCV, + 0, { COMMON_ATTRS, BGP_ATTR_FLAG_TRANS | BGP_ATTR_FLAG_OPTIONAL, @@ -685,7 +685,7 @@ static struct aspath_tests { "8466 3 52737 4096", AS4_DATA, -1, - PEER_CAP_AS4_RCV | PEER_CAP_AS4_ADV, + 0, { COMMON_ATTRS, BGP_ATTR_FLAG_TRANS, @@ -701,7 +701,7 @@ static struct aspath_tests { "8466 3 52737 4096", AS4_DATA, -1, - PEER_CAP_AS4_RCV | PEER_CAP_AS4_ADV, + 0, { COMMON_ATTRS, BGP_ATTR_FLAG_TRANS, @@ -717,7 +717,7 @@ static struct aspath_tests { "8466 3 52737 4096", AS4_DATA, -1, - PEER_CAP_AS4_RCV | PEER_CAP_AS4_ADV, + 0, { COMMON_ATTRS, BGP_ATTR_FLAG_TRANS, @@ -733,7 +733,7 @@ static struct aspath_tests { "8466 3 52737 4096", AS4_DATA, -1, - PEER_CAP_AS4_RCV | PEER_CAP_AS4_ADV, + 0, { COMMON_ATTRS, BGP_ATTR_FLAG_TRANS | BGP_ATTR_FLAG_OPTIONAL, diff --git a/tests/bgpd/test_capability.c b/tests/bgpd/test_capability.c index 38f896b30ca8..1ee47a38e457 100644 --- a/tests/bgpd/test_capability.c +++ b/tests/bgpd/test_capability.c @@ -617,6 +617,7 @@ static struct test_segment misc_segments[] = }, 2, SHOULD_ERR, + -1, }, { "dyn-empty",