Skip to content

Commit

Permalink
tests: Adopt tests for AS4 handling
Browse files Browse the repository at this point in the history
When received malformed AS4 capability, it should return -1 (notification send),
and the received flag SHOULD NOT be set.

Signed-off-by: Donatas Abraitis <[email protected]>
  • Loading branch information
ton31337 committed Jan 16, 2024
1 parent 02a5da4 commit 90254e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/bgpd/test_aspath.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down
1 change: 1 addition & 0 deletions tests/bgpd/test_capability.c
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,7 @@ static struct test_segment misc_segments[] =
},
2,
SHOULD_ERR,
-1,
},
{
"dyn-empty",
Expand Down

0 comments on commit 90254e7

Please sign in to comment.