summaryrefslogtreecommitdiff
path: root/tests/bgp_mp_attr_test.c
diff options
context:
space:
mode:
authorPaul Jakma <paul@quagga.net>2012-05-01 16:20:33 +0100
committerPaul Jakma <paul@quagga.net>2012-05-02 11:02:10 +0100
commit1dba254e107dd0c4254d58e9304fc6293b46fd4d (patch)
tree963153a04b71da32dd5906b80aaf24a1bb6c93e9 /tests/bgp_mp_attr_test.c
parent6ebeebb50610cc86d16e56bc1a33d63340094215 (diff)
tests: Fix some compile errors and warnings
* aspath_test.c: match changes in aspath_unintern. Fix printf size_t warning. * bgp_capability_test.c: compile warnings. * bgp_mp_attr_test.c: update for attr parser context struct * ecommunity_test.c: ecommunity_free/ecommunity * test-checksum.c: some unused vars and funcs without need of prototypes.
Diffstat (limited to 'tests/bgp_mp_attr_test.c')
-rw-r--r--tests/bgp_mp_attr_test.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/tests/bgp_mp_attr_test.c b/tests/bgp_mp_attr_test.c
index 9cbe9f22..1a48f4b7 100644
--- a/tests/bgp_mp_attr_test.c
+++ b/tests/bgp_mp_attr_test.c
@@ -438,6 +438,15 @@ parse_test (struct peer *peer, struct test_segment *t, int type)
int oldfailed = failed;
struct attr attr;
struct bgp_nlri nlri;
+ struct bgp_attr_parser_args attr_args = {
+ .peer = peer,
+ .length = t->len,
+ .total = 1,
+ .attr = &attr,
+ .type = BGP_ATTR_MP_REACH_NLRI,
+ .flags = BGP_ATTR_FLAG_OPTIONAL,
+ .startp = BGP_INPUT_PNT (peer),
+ };
#define RANDOM_FUZZ 35
stream_reset (peer->ibuf);
@@ -447,11 +456,12 @@ parse_test (struct peer *peer, struct test_segment *t, int type)
stream_write (peer->ibuf, t->data, t->len);
printf ("%s: %s\n", t->name, t->desc);
-
+
+
if (type == BGP_ATTR_MP_REACH_NLRI)
- ret = bgp_mp_reach_parse (peer, t->len, &attr, BGP_ATTR_FLAG_OPTIONAL, BGP_INPUT_PNT (peer), &nlri);
+ ret = bgp_mp_reach_parse (&attr_args, &nlri);
else
- ret = bgp_mp_unreach_parse (peer, t->len, BGP_ATTR_FLAG_OPTIONAL, BGP_INPUT_PNT (peer), &nlri);
+ ret = bgp_mp_unreach_parse (&attr_args, &nlri);
if (!ret)
{