diff options
author | Paul Jakma <paul.jakma@hpe.com> | 2015-11-25 17:14:36 +0000 |
---|---|---|
committer | Paul Jakma <paul.jakma@hpe.com> | 2016-02-10 15:06:18 +0000 |
commit | 321d4130a615445d0f49f41c909c92d5401fd5ff (patch) | |
tree | 9e1f96ca0986a6c9e990993c46b0657bb33f1c09 | |
parent | 4078f2eb7a3a94ddb30cfd8b76b054e790aab524 (diff) | |
download | quagga-321d4130a615445d0f49f41c909c92d5401fd5ff.tar.bz2 quagga-321d4130a615445d0f49f41c909c92d5401fd5ff.tar.xz |
tests: add more AS4 capability tests + little fixes for couple of GR test cases.
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
-rw-r--r-- | tests/bgp_capability_test.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/tests/bgp_capability_test.c b/tests/bgp_capability_test.c index 96f18f01..3cfc1987 100644 --- a/tests/bgp_capability_test.c +++ b/tests/bgp_capability_test.c @@ -311,7 +311,16 @@ static struct test_segment misc_segments[] = { 0x41, 0x4, 0xab, 0xcd, 0xef, 0x12 }, /* AS: 2882400018 */ 6, SHOULD_PARSE, 2882400018, }, - /* 20 */ + { "AS4", + "AS4 capability: short", + { 0x41, 0x4, 0xab, 0xcd, 0xef }, /* AS: 2882400018 */ + 5, SHOULD_ERR, + }, + { "AS4", + "AS4 capability: long", + { 0x41, 0x4, 0xab, 0xcd, 0xef, 0x12, 0x12 }, + 7, SHOULD_ERR, 2882400018, + }, { "GR", "GR capability", { /* hdr */ CAPABILITY_CODE_RESTART, 0xe, @@ -328,7 +337,6 @@ static struct test_segment misc_segments[] = }, 16, SHOULD_PARSE, }, - /* 21 */ { "GR-short", "GR capability, but header length too short", { /* hdr */ 0x40, 0xa, @@ -343,9 +351,8 @@ static struct test_segment misc_segments[] = /* safi */ 0x2, /* flags */ 0x1, }, - 16, SHOULD_PARSE, + 15 /* array is 16 though */, SHOULD_ERR, }, - /* 22 */ { "GR-long", "GR capability, but header length too long", { /* hdr */ 0x40, 0xf, @@ -358,6 +365,7 @@ static struct test_segment misc_segments[] = /* flags */ 0x0, /* afi */ 0x0, 0x2, /* safi */ 0x2, + /* flags */ 0x01, }, 16, SHOULD_ERR, }, |