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 <donatas@opensourcerouting.org>
This commit is contained in:
Donatas Abraitis 2024-01-16 16:28:41 +02:00
parent 02a5da440b
commit 90254e7bc2
2 changed files with 6 additions and 5 deletions

View file

@ -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,

View file

@ -617,6 +617,7 @@ static struct test_segment misc_segments[] =
},
2,
SHOULD_ERR,
-1,
},
{
"dyn-empty",