version 1.1.1.2, 2012/10/09 09:22:29
|
version 1.1.1.3, 2013/07/21 23:54:40
|
Line 1
|
Line 1
|
/* this testcase is currently broken |
|
* -- 2012-05-01 David Lamparter <equinox@diac24.net> |
|
*/ |
|
int main() { return 0; } |
|
|
|
#include <zebra.h> |
#include <zebra.h> |
|
|
#include "vty.h" |
#include "vty.h" |
Line 29 int main() { return 0; }
|
Line 24 int main() { return 0; }
|
struct zebra_privs_t *bgpd_privs = NULL; |
struct zebra_privs_t *bgpd_privs = NULL; |
struct thread_master *master = NULL; |
struct thread_master *master = NULL; |
|
|
#if 0 |
|
static int failed = 0; |
static int failed = 0; |
static int tty = 0; |
static int tty = 0; |
|
|
Line 442 parse_test (struct peer *peer, struct test_segment *t,
|
Line 436 parse_test (struct peer *peer, struct test_segment *t,
|
{ |
{ |
int ret; |
int ret; |
int oldfailed = failed; |
int oldfailed = failed; |
struct attr attr; | struct attr attr = { }; |
struct bgp_nlri nlri; | 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 |
#define RANDOM_FUZZ 35 |
|
|
stream_reset (peer->ibuf); |
stream_reset (peer->ibuf); |
Line 453 parse_test (struct peer *peer, struct test_segment *t,
|
Line 456 parse_test (struct peer *peer, struct test_segment *t,
|
stream_write (peer->ibuf, t->data, t->len); |
stream_write (peer->ibuf, t->data, t->len); |
|
|
printf ("%s: %s\n", t->name, t->desc); |
printf ("%s: %s\n", t->name, t->desc); |
| |
| |
if (type == BGP_ATTR_MP_REACH_NLRI) |
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 |
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) |
if (!ret) |
{ |
{ |
Line 511 main (void)
|
Line 515 main (void)
|
|
|
master = thread_master_create (); |
master = thread_master_create (); |
bgp_master_init (); |
bgp_master_init (); |
|
bgp_option_set (BGP_OPT_NO_LISTEN); |
|
|
if (fileno (stdout) >= 0) |
if (fileno (stdout) >= 0) |
tty = isatty (fileno (stdout)); |
tty = isatty (fileno (stdout)); |
Line 539 main (void)
|
Line 544 main (void)
|
printf ("failures: %d\n", failed); |
printf ("failures: %d\n", failed); |
return failed; |
return failed; |
} |
} |
#endif /* #if 0 */ |
|