diff options
Diffstat (limited to 'tests/bgpd/test_capability.c')
| -rw-r--r-- | tests/bgpd/test_capability.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/bgpd/test_capability.c b/tests/bgpd/test_capability.c index da17471fd1..1ee47a38e4 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", @@ -835,7 +836,7 @@ static void parse_test(struct peer *peer, struct test_segment *t, int type) switch (type) { case CAPABILITY: len += 2; /* to cover the OPT-Param header */ - _FALLTHROUGH + fallthrough; case OPT_PARAM: printf("len: %u\n", len); /* peek_for_as4 wants getp at capibility*/ @@ -847,7 +848,7 @@ static void parse_test(struct peer *peer, struct test_segment *t, int type) ret = bgp_open_option_parse(peer, len, &capability); break; case DYNCAP: - ret = bgp_capability_receive(peer, t->len); + ret = bgp_capability_receive(peer->connection, peer, t->len); break; default: printf("unknown type %u\n", type); @@ -972,7 +973,8 @@ int main(void) parse_test(peer, &opt_params[i++], OPT_PARAM); SET_FLAG(peer->cap, PEER_CAP_DYNAMIC_ADV); - peer->status = Established; + peer->connection = bgp_peer_connection_new(peer); + peer->connection->status = Established; i = 0; while (dynamic_cap_msgs[i].name) |
