diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/bgpd/test_bgp_table.c | 4 | ||||
| -rw-r--r-- | tests/lib/test_atomlist.c | 19 | ||||
| -rw-r--r-- | tests/lib/test_stream.c | 18 | ||||
| -rw-r--r-- | tests/lib/test_typelist.c | 5 | ||||
| -rw-r--r-- | tests/lib/test_typelist.h | 8 | ||||
| -rw-r--r-- | tests/subdir.am | 3 | ||||
| -rw-r--r-- | tests/topotests/bgp_rr_ibgp/spine1/show_ip_route.json_ref | 28 | ||||
| -rw-r--r-- | tests/topotests/bgp_rr_ibgp/spine2/bgpd.conf | 8 | ||||
| -rw-r--r-- | tests/topotests/bgp_rr_ibgp/spine2/show_ip_route.json_ref | 162 | ||||
| -rw-r--r-- | tests/topotests/bgp_rr_ibgp/spine2/staticd.conf | 1 | ||||
| -rw-r--r-- | tests/topotests/bgp_rr_ibgp/spine2/zebra.conf | 9 | ||||
| -rwxr-xr-x | tests/topotests/bgp_rr_ibgp/test_bgp_rr_ibgp_topo1.py | 53 | ||||
| -rw-r--r-- | tests/topotests/bgp_rr_ibgp/tor1/bgpd.conf | 1 | ||||
| -rw-r--r-- | tests/topotests/bgp_rr_ibgp/tor1/show_ip_route.json_ref | 64 | ||||
| -rw-r--r-- | tests/topotests/bgp_rr_ibgp/tor1/zebra.conf | 4 | ||||
| -rw-r--r-- | tests/topotests/bgp_rr_ibgp/tor2/bgpd.conf | 1 | ||||
| -rw-r--r-- | tests/topotests/bgp_rr_ibgp/tor2/show_ip_route.json_ref | 64 | ||||
| -rw-r--r-- | tests/topotests/bgp_rr_ibgp/tor2/zebra.conf | 4 | ||||
| -rw-r--r-- | tests/topotests/pytest.ini | 2 |
19 files changed, 96 insertions, 362 deletions
diff --git a/tests/bgpd/test_bgp_table.c b/tests/bgpd/test_bgp_table.c index 819c2d7282..79a8bb4408 100644 --- a/tests/bgpd/test_bgp_table.c +++ b/tests/bgpd/test_bgp_table.c @@ -82,7 +82,7 @@ static void print_range_result(struct list *list) for (ALL_LIST_ELEMENTS_RO(list, listnode, bnode)) { char buf[PREFIX2STR_BUFFER]; - prefix2str(&bnode->p, buf, PREFIX2STR_BUFFER); + prefix2str(bgp_node_get_prefix(bnode), buf, PREFIX2STR_BUFFER); printf("%s\n", buf); } } @@ -106,7 +106,7 @@ static void check_lookup_result(struct list *list, va_list arglist) assert(0); for (ALL_LIST_ELEMENTS_RO(list, listnode, bnode)) { - if (prefix_same(&bnode->p, &p)) + if (prefix_same(bgp_node_get_prefix(bnode), &p)) found = true; } diff --git a/tests/lib/test_atomlist.c b/tests/lib/test_atomlist.c index 238ee9539e..40837b4722 100644 --- a/tests/lib/test_atomlist.c +++ b/tests/lib/test_atomlist.c @@ -29,6 +29,7 @@ #include "atomlist.h" #include "seqlock.h" #include "monotime.h" +#include "printfrr.h" /* * maybe test: @@ -288,7 +289,7 @@ static void run_tr(struct testrun *tr) size_t c = 0, s = 0, n = 0; struct item *item, *prev, dummy; - printf("[%02u] %35s %s\n", seqlock_cur(&sqlo) >> 2, "", desc); + printfrr("[%02u] %35s %s\n", seqlock_cur(&sqlo) >> 2, "", desc); fflush(stdout); if (tr->prefill != NOCLEAR) @@ -324,7 +325,7 @@ static void run_tr(struct testrun *tr) } assert(c == alist_count(&ahead)); } - printf("\033[1A[%02u] %9"PRId64"us c=%5zu s=%5zu n=%5zu %s\n", + printfrr("\033[1A[%02u] %9"PRId64"us c=%5zu s=%5zu n=%5zu %s\n", sv >> 2, delta, c, s, n, desc); } @@ -334,9 +335,9 @@ static void dump(const char *lbl) struct item *item, *safe; size_t ctr = 0; - printf("dumping %s:\n", lbl); + printfrr("dumping %s:\n", lbl); frr_each_safe(alist, &ahead, item) { - printf("%s %3zu %p %3"PRIu64" %3"PRIu64"\n", lbl, ctr++, + printfrr("%s %3zu %p %3"PRIu64" %3"PRIu64"\n", lbl, ctr++, (void *)item, item->val1, item->val2); } } @@ -362,12 +363,12 @@ static void basic_tests(void) dump(""); alist_del(&ahead, &itm[1]); dump(""); - printf("POP: %p\n", alist_pop(&ahead)); + printfrr("POP: %p\n", alist_pop(&ahead)); dump(""); - printf("POP: %p\n", alist_pop(&ahead)); - printf("POP: %p\n", alist_pop(&ahead)); - printf("POP: %p\n", alist_pop(&ahead)); - printf("POP: %p\n", alist_pop(&ahead)); + printfrr("POP: %p\n", alist_pop(&ahead)); + printfrr("POP: %p\n", alist_pop(&ahead)); + printfrr("POP: %p\n", alist_pop(&ahead)); + printfrr("POP: %p\n", alist_pop(&ahead)); dump(""); } #else diff --git a/tests/lib/test_stream.c b/tests/lib/test_stream.c index 2ecfc87942..a45c2b4d54 100644 --- a/tests/lib/test_stream.c +++ b/tests/lib/test_stream.c @@ -23,6 +23,8 @@ #include <stream.h> #include <thread.h> +#include "printfrr.h" + static unsigned long long ham = 0xdeadbeefdeadbeef; struct thread_master *master; @@ -30,15 +32,15 @@ static void print_stream(struct stream *s) { size_t getp = stream_get_getp(s); - printf("endp: %zu, readable: %zu, writeable: %zu\n", stream_get_endp(s), - STREAM_READABLE(s), STREAM_WRITEABLE(s)); + printfrr("endp: %zu, readable: %zu, writeable: %zu\n", + stream_get_endp(s), STREAM_READABLE(s), STREAM_WRITEABLE(s)); while (STREAM_READABLE(s)) { - printf("0x%x ", *stream_pnt(s)); + printfrr("0x%x ", *stream_pnt(s)); stream_forward_getp(s, 1); } - printf("\n"); + printfrr("\n"); /* put getp back to where it was */ stream_set_getp(s, getp); @@ -61,10 +63,10 @@ int main(void) print_stream(s); - printf("c: 0x%hhx\n", stream_getc(s)); - printf("w: 0x%hx\n", stream_getw(s)); - printf("l: 0x%x\n", stream_getl(s)); - printf("q: 0x%" PRIx64 "\n", stream_getq(s)); + printfrr("c: 0x%hhx\n", stream_getc(s)); + printfrr("w: 0x%hx\n", stream_getw(s)); + printfrr("l: 0x%x\n", stream_getl(s)); + printfrr("q: 0x%" PRIx64 "\n", stream_getq(s)); return 0; } diff --git a/tests/lib/test_typelist.c b/tests/lib/test_typelist.c index 2438fb5f08..607e29e56b 100644 --- a/tests/lib/test_typelist.c +++ b/tests/lib/test_typelist.c @@ -35,6 +35,7 @@ #include "monotime.h" #include "jhash.h" #include "sha256.h" +#include "printfrr.h" #include "tests/helpers/c/prng.h" @@ -90,14 +91,14 @@ static void ts_ref(const char *text) { int64_t us; us = monotime_since(&ref, NULL); - printf("%7"PRId64"us %s\n", us, text); + printfrr("%7"PRId64"us %s\n", us, text); monotime(&ref); } static void ts_end(void) { int64_t us; us = monotime_since(&ref0, NULL); - printf("%7"PRId64"us total\n", us); + printfrr("%7"PRId64"us total\n", us); } #define TYPE LIST diff --git a/tests/lib/test_typelist.h b/tests/lib/test_typelist.h index 9039fa8a46..da3530e9c0 100644 --- a/tests/lib/test_typelist.h +++ b/tests/lib/test_typelist.h @@ -123,10 +123,10 @@ static void ts_hash(const char *text, const char *expect) for (i = 0; i < sizeof(hash); i++) sprintf(hashtext + i * 2, "%02x", hash[i]); - printf("%7"PRId64"us %-25s %s%s\n", us, text, + printfrr("%7"PRId64"us %-25s %s%s\n", us, text, expect ? " " : "*", hashtext); if (expect && strcmp(expect, hashtext)) { - printf("%-21s %s\n", "EXPECTED:", expect); + printfrr("%-21s %s\n", "EXPECTED:", expect); assert(0); } monotime(&ref); @@ -149,7 +149,7 @@ static void concat(test_, TYPE)(void) for (i = 0; i < NITEM; i++) itm[i].val = i; - printf("%s start\n", str(TYPE)); + printfrr("%s start\n", str(TYPE)); ts_start(); list_init(&head); @@ -530,7 +530,7 @@ static void concat(test_, TYPE)(void) list_fini(&head); ts_ref("fini"); ts_end(); - printf("%s end\n", str(TYPE)); + printfrr("%s end\n", str(TYPE)); } #undef ts_hashx diff --git a/tests/subdir.am b/tests/subdir.am index d87d348949..bce08c4034 100644 --- a/tests/subdir.am +++ b/tests/subdir.am @@ -38,8 +38,11 @@ else TESTS_OSPF6D = endif +tests/lib/cli/test_cli_clippy.c: $(CLIPPY_DEPS) tests/lib/cli/tests_lib_cli_test_cli-test_cli.$(OBJEXT): tests/lib/cli/test_cli_clippy.c tests/lib/cli/test_cli-test_cli.$(OBJEXT): tests/lib/cli/test_cli_clippy.c + +tests/ospf6d/test_lsdb_clippy.c: $(CLIPPY_DEPS) tests/ospf6d/tests_ospf6d_test_lsdb-test_lsdb.$(OBJEXT): tests/ospf6d/test_lsdb_clippy.c tests/ospf6d/test_lsdb-test_lsdb.$(OBJEXT): tests/ospf6d/test_lsdb_clippy.c diff --git a/tests/topotests/bgp_rr_ibgp/spine1/show_ip_route.json_ref b/tests/topotests/bgp_rr_ibgp/spine1/show_ip_route.json_ref index 552e96ddb9..75ce1b149e 100644 --- a/tests/topotests/bgp_rr_ibgp/spine1/show_ip_route.json_ref +++ b/tests/topotests/bgp_rr_ibgp/spine1/show_ip_route.json_ref @@ -11,15 +11,12 @@ "table":254, "internalStatus":16, "internalFlags":13, - "internalNextHopNum":1, - "internalNextHopActiveNum":1, "nexthops":[ { "flags":3, "fib":true, "ip":"192.168.2.1", "afi":"ipv4", - "interfaceIndex":2, "interfaceName":"spine1-eth0", "active":true } @@ -38,14 +35,11 @@ "table":254, "internalStatus":16, "internalFlags":8, - "internalNextHopNum":1, - "internalNextHopActiveNum":1, "nexthops":[ { "flags":3, "fib":true, "directlyConnected":true, - "interfaceIndex":2, "interfaceName":"spine1-eth0", "active":true } @@ -64,15 +58,12 @@ "table":254, "internalStatus":16, "internalFlags":13, - "internalNextHopNum":1, - "internalNextHopActiveNum":1, "nexthops":[ { "flags":3, "fib":true, "ip":"192.168.4.2", "afi":"ipv4", - "interfaceIndex":3, "interfaceName":"spine1-eth1", "active":true } @@ -91,23 +82,20 @@ "table":254, "internalStatus":16, "internalFlags":8, - "internalNextHopNum":1, - "internalNextHopActiveNum":1, "nexthops":[ { "flags":3, "fib":true, "directlyConnected":true, - "interfaceIndex":3, "interfaceName":"spine1-eth1", "active":true } ] } ], - "192.168.5.0\/24":[ + "192.168.5.1\/32":[ { - "prefix":"192.168.5.0\/24", + "prefix":"192.168.5.1\/32", "protocol":"bgp", "selected":true, "destSelected":true, @@ -117,24 +105,21 @@ "table":254, "internalStatus":16, "internalFlags":13, - "internalNextHopNum":1, - "internalNextHopActiveNum":1, "nexthops":[ { "flags":3, "fib":true, "ip":"192.168.2.1", "afi":"ipv4", - "interfaceIndex":2, "interfaceName":"spine1-eth0", "active":true } ] } ], - "192.168.6.0\/24":[ + "192.168.6.2\/32":[ { - "prefix":"192.168.6.0\/24", + "prefix":"192.168.6.2\/32", "protocol":"bgp", "selected":true, "destSelected":true, @@ -144,19 +129,16 @@ "table":254, "internalStatus":16, "internalFlags":13, - "internalNextHopNum":1, - "internalNextHopActiveNum":1, "nexthops":[ { "flags":3, "fib":true, "ip":"192.168.4.2", "afi":"ipv4", - "interfaceIndex":3, "interfaceName":"spine1-eth1", "active":true } ] } ] -} +}
\ No newline at end of file diff --git a/tests/topotests/bgp_rr_ibgp/spine2/bgpd.conf b/tests/topotests/bgp_rr_ibgp/spine2/bgpd.conf deleted file mode 100644 index a865b388ac..0000000000 --- a/tests/topotests/bgp_rr_ibgp/spine2/bgpd.conf +++ /dev/null @@ -1,8 +0,0 @@ -hostname spine2 -router bgp 99 - neighbor 192.168.5.1 remote-as internal - neighbor 192.168.6.2 remote-as internal - address-family ipv4 uni - redistribute connected - neighbor 192.168.5.1 route-reflector-client - neighbor 192.168.6.2 route-reflector-client diff --git a/tests/topotests/bgp_rr_ibgp/spine2/show_ip_route.json_ref b/tests/topotests/bgp_rr_ibgp/spine2/show_ip_route.json_ref deleted file mode 100644 index c428a8832f..0000000000 --- a/tests/topotests/bgp_rr_ibgp/spine2/show_ip_route.json_ref +++ /dev/null @@ -1,162 +0,0 @@ -{ - "192.168.1.0\/24":[ - { - "prefix":"192.168.1.0\/24", - "protocol":"bgp", - "selected":true, - "destSelected":true, - "distance":200, - "metric":0, - "installed":true, - "table":254, - "internalStatus":16, - "internalFlags":13, - "internalNextHopNum":1, - "internalNextHopActiveNum":1, - "nexthops":[ - { - "flags":3, - "fib":true, - "ip":"192.168.5.1", - "afi":"ipv4", - "interfaceIndex":2, - "interfaceName":"spine2-eth0", - "active":true - } - ] - } - ], - "192.168.2.0\/24":[ - { - "prefix":"192.168.2.0\/24", - "protocol":"bgp", - "selected":true, - "destSelected":true, - "distance":200, - "metric":0, - "installed":true, - "table":254, - "internalStatus":16, - "internalFlags":13, - "internalNextHopNum":1, - "internalNextHopActiveNum":1, - "nexthops":[ - { - "flags":3, - "fib":true, - "ip":"192.168.5.1", - "afi":"ipv4", - "interfaceIndex":2, - "interfaceName":"spine2-eth0", - "active":true - } - ] - } - ], - "192.168.3.0\/24":[ - { - "prefix":"192.168.3.0\/24", - "protocol":"bgp", - "selected":true, - "destSelected":true, - "distance":200, - "metric":0, - "installed":true, - "table":254, - "internalStatus":16, - "internalFlags":13, - "internalNextHopNum":1, - "internalNextHopActiveNum":1, - "nexthops":[ - { - "flags":3, - "fib":true, - "ip":"192.168.6.2", - "afi":"ipv4", - "interfaceIndex":3, - "interfaceName":"spine2-eth1", - "active":true - } - ] - } - ], - "192.168.4.0\/24":[ - { - "prefix":"192.168.4.0\/24", - "protocol":"bgp", - "selected":true, - "destSelected":true, - "distance":200, - "metric":0, - "installed":true, - "table":254, - "internalStatus":16, - "internalFlags":13, - "internalNextHopNum":1, - "internalNextHopActiveNum":1, - "nexthops":[ - { - "flags":3, - "fib":true, - "ip":"192.168.6.2", - "afi":"ipv4", - "interfaceIndex":3, - "interfaceName":"spine2-eth1", - "active":true - } - ] - } - ], - "192.168.5.0\/24":[ - { - "prefix":"192.168.5.0\/24", - "protocol":"connected", - "selected":true, - "destSelected":true, - "distance":0, - "metric":0, - "installed":true, - "table":254, - "internalStatus":16, - "internalFlags":8, - "internalNextHopNum":1, - "internalNextHopActiveNum":1, - "nexthops":[ - { - "flags":3, - "fib":true, - "directlyConnected":true, - "interfaceIndex":2, - "interfaceName":"spine2-eth0", - "active":true - } - ] - } - ], - "192.168.6.0\/24":[ - { - "prefix":"192.168.6.0\/24", - "protocol":"connected", - "selected":true, - "destSelected":true, - "distance":0, - "metric":0, - "installed":true, - "table":254, - "internalStatus":16, - "internalFlags":8, - "internalNextHopNum":1, - "internalNextHopActiveNum":1, - "nexthops":[ - { - "flags":3, - "fib":true, - "directlyConnected":true, - "interfaceIndex":3, - "interfaceName":"spine2-eth1", - "active":true - } - ] - } - ] -} diff --git a/tests/topotests/bgp_rr_ibgp/spine2/staticd.conf b/tests/topotests/bgp_rr_ibgp/spine2/staticd.conf deleted file mode 100644 index 3ee14d262c..0000000000 --- a/tests/topotests/bgp_rr_ibgp/spine2/staticd.conf +++ /dev/null @@ -1 +0,0 @@ -hostname spine2 diff --git a/tests/topotests/bgp_rr_ibgp/spine2/zebra.conf b/tests/topotests/bgp_rr_ibgp/spine2/zebra.conf deleted file mode 100644 index a06681fbc4..0000000000 --- a/tests/topotests/bgp_rr_ibgp/spine2/zebra.conf +++ /dev/null @@ -1,9 +0,0 @@ -hostname spine2 -ip forwarding -ipv6 forwarding - -int spine2-eth0 - ip addr 192.168.5.4/24 - -int spine2-eth1 - ip addr 192.168.6.4/24 diff --git a/tests/topotests/bgp_rr_ibgp/test_bgp_rr_ibgp_topo1.py b/tests/topotests/bgp_rr_ibgp/test_bgp_rr_ibgp_topo1.py index c28394a7a7..c7daa06b76 100755 --- a/tests/topotests/bgp_rr_ibgp/test_bgp_rr_ibgp_topo1.py +++ b/tests/topotests/bgp_rr_ibgp/test_bgp_rr_ibgp_topo1.py @@ -25,47 +25,8 @@ """ test_bgp_rr_ibgp_topo1.py: Testing IBGP with RR and no IGP - - In a leaf/spine topology with only IBGP connections, where - the same network is being redistributed at multiple points - in the network ( say a redistribute connected at both leaf and spines ) - we end up in a state where zebra gets very confused. - - eva# show ip route - Codes: K - kernel route, C - connected, S - static, R - RIP, - O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP, - T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP, - F - PBR, f - OpenFabric, - > - selected route, * - FIB route, q - queued route, r - rejected route - - C>* 192.168.1.0/24 is directly connected, tor1-eth0, 00:00:30 - C>* 192.168.2.0/24 is directly connected, tor1-eth1, 00:00:30 - B 192.168.3.0/24 [200/0] via 192.168.4.2 inactive, 00:00:25 - via 192.168.6.2 inactive, 00:00:25 - B>* 192.168.4.0/24 [200/0] via 192.168.2.3, tor1-eth1, 00:00:25 - * via 192.168.6.2 inactive, 00:00:25 - C>* 192.168.5.0/24 is directly connected, tor1-eth2, 00:00:30 - B>* 192.168.6.0/24 [200/0] via 192.168.4.2 inactive, 00:00:25 - * via 192.168.5.4, tor1-eth2, 00:00:25 - - Effectively we have ibgp routes recursing through ibgp routes - and there is no metric to discern whom to listen to. - - This draft: - https://tools.ietf.org/html/draft-ietf-idr-bgp-optimal-route-reflection-19 - - appears to address this issue. From looking at both cisco and arista - deployments they are handling this issue by having the route reflector - prefer the localy learned routes over from their clients. - - Add this topology, in a broken state, so that when we do fix this issue - it is a simple matter of touching this topology up and re-adding it - to the normal daily builds. I also wanted to add this topology - since it is in a state of `doneness` and I wanted to move onto - my normal day job without having to remember about this test. - - This topology is not configured to be run as part of the normal - topotests. +Ensure that a basic rr topology comes up and correctly passes +routes around """ @@ -105,7 +66,6 @@ class NetworkTopo(Topo): tgen.add_router('tor1') tgen.add_router('tor2') tgen.add_router('spine1') - tgen.add_router('spine2') # First switch is for a dummy interface (for local network) # on tor1 @@ -128,15 +88,6 @@ class NetworkTopo(Topo): switch.add_link(tgen.gears['tor2']) switch.add_link(tgen.gears['spine1']) - # 192.168.5.0/24 - tor1 <-> spine2 connection - switch = tgen.add_switch('sw5') - switch.add_link(tgen.gears['tor1']) - switch.add_link(tgen.gears['spine2']) - - # 192.168.6.0/24 - tor2 <-> spine2 connection - switch = tgen.add_switch('sw6') - switch.add_link(tgen.gears['tor2']) - switch.add_link(tgen.gears['spine2']) ##################################################### ## diff --git a/tests/topotests/bgp_rr_ibgp/tor1/bgpd.conf b/tests/topotests/bgp_rr_ibgp/tor1/bgpd.conf index 44a78dffd7..e8ec0f7680 100644 --- a/tests/topotests/bgp_rr_ibgp/tor1/bgpd.conf +++ b/tests/topotests/bgp_rr_ibgp/tor1/bgpd.conf @@ -1,5 +1,4 @@ hostname tor1 router bgp 99 neighbor 192.168.2.3 remote-as internal - neighbor 192.168.5.4 remote-as internal redistribute connected diff --git a/tests/topotests/bgp_rr_ibgp/tor1/show_ip_route.json_ref b/tests/topotests/bgp_rr_ibgp/tor1/show_ip_route.json_ref index 223dcebbca..6cfa02441f 100644 --- a/tests/topotests/bgp_rr_ibgp/tor1/show_ip_route.json_ref +++ b/tests/topotests/bgp_rr_ibgp/tor1/show_ip_route.json_ref @@ -11,14 +11,11 @@ "table":254, "internalStatus":16, "internalFlags":8, - "internalNextHopNum":1, - "internalNextHopActiveNum":1, "nexthops":[ { "flags":3, "fib":true, "directlyConnected":true, - "interfaceIndex":2, "interfaceName":"tor1-eth0", "active":true } @@ -37,14 +34,11 @@ "table":254, "internalStatus":16, "internalFlags":8, - "internalNextHopNum":1, - "internalNextHopActiveNum":1, "nexthops":[ { "flags":3, "fib":true, "directlyConnected":true, - "interfaceIndex":3, "interfaceName":"tor1-eth1", "active":true } @@ -55,23 +49,29 @@ { "prefix":"192.168.3.0\/24", "protocol":"bgp", + "selected":true, + "destSelected":true, "distance":200, "metric":0, + "installed":true, "table":254, - "internalStatus":0, - "internalFlags":5, - "internalNextHopNum":2, - "internalNextHopActiveNum":0, + "internalStatus":16, + "internalFlags":13, "nexthops":[ { - "flags":0, + "flags":5, "ip":"192.168.4.2", - "afi":"ipv4" + "afi":"ipv4", + "active":true, + "recursive":true }, { - "flags":0, - "ip":"192.168.6.2", - "afi":"ipv4" + "flags":3, + "fib":true, + "ip":"192.168.2.3", + "afi":"ipv4", + "interfaceName":"tor1-eth1", + "active":true } ] } @@ -88,29 +88,21 @@ "table":254, "internalStatus":16, "internalFlags":13, - "internalNextHopNum":2, - "internalNextHopActiveNum":1, "nexthops":[ { "flags":3, "fib":true, "ip":"192.168.2.3", "afi":"ipv4", - "interfaceIndex":3, "interfaceName":"tor1-eth1", "active":true - }, - { - "flags":0, - "ip":"192.168.6.2", - "afi":"ipv4" } ] } ], - "192.168.5.0\/24":[ + "192.168.5.1\/32":[ { - "prefix":"192.168.5.0\/24", + "prefix":"192.168.5.1\/32", "protocol":"connected", "selected":true, "destSelected":true, @@ -120,23 +112,20 @@ "table":254, "internalStatus":16, "internalFlags":8, - "internalNextHopNum":1, - "internalNextHopActiveNum":1, "nexthops":[ { "flags":3, "fib":true, "directlyConnected":true, - "interfaceIndex":4, - "interfaceName":"tor1-eth2", + "interfaceName":"lo", "active":true } ] } ], - "192.168.6.0\/24":[ + "192.168.6.2\/32":[ { - "prefix":"192.168.6.0\/24", + "prefix":"192.168.6.2\/32", "protocol":"bgp", "selected":true, "destSelected":true, @@ -146,21 +135,20 @@ "table":254, "internalStatus":16, "internalFlags":13, - "internalNextHopNum":2, - "internalNextHopActiveNum":1, "nexthops":[ { - "flags":0, + "flags":5, "ip":"192.168.4.2", - "afi":"ipv4" + "afi":"ipv4", + "active":true, + "recursive":true }, { "flags":3, "fib":true, - "ip":"192.168.5.4", + "ip":"192.168.2.3", "afi":"ipv4", - "interfaceIndex":4, - "interfaceName":"tor1-eth2", + "interfaceName":"tor1-eth1", "active":true } ] diff --git a/tests/topotests/bgp_rr_ibgp/tor1/zebra.conf b/tests/topotests/bgp_rr_ibgp/tor1/zebra.conf index f2fa713507..25b4fcfd0f 100644 --- a/tests/topotests/bgp_rr_ibgp/tor1/zebra.conf +++ b/tests/topotests/bgp_rr_ibgp/tor1/zebra.conf @@ -8,5 +8,5 @@ int tor1-eth0 int tor1-eth1 ip addr 192.168.2.1/24 -int tor1-eth2 - ip addr 192.168.5.1/24 +int lo + ip addr 192.168.5.1/32 diff --git a/tests/topotests/bgp_rr_ibgp/tor2/bgpd.conf b/tests/topotests/bgp_rr_ibgp/tor2/bgpd.conf index 5ef1de260e..b091c97ac3 100644 --- a/tests/topotests/bgp_rr_ibgp/tor2/bgpd.conf +++ b/tests/topotests/bgp_rr_ibgp/tor2/bgpd.conf @@ -1,5 +1,4 @@ hostname tor2 router bgp 99 neighbor 192.168.4.3 remote-as internal - neighbor 192.168.6.4 remote-as internal redistribute connected diff --git a/tests/topotests/bgp_rr_ibgp/tor2/show_ip_route.json_ref b/tests/topotests/bgp_rr_ibgp/tor2/show_ip_route.json_ref index 5f041b8c62..d9e9290e61 100644 --- a/tests/topotests/bgp_rr_ibgp/tor2/show_ip_route.json_ref +++ b/tests/topotests/bgp_rr_ibgp/tor2/show_ip_route.json_ref @@ -3,23 +3,29 @@ { "prefix":"192.168.1.0\/24", "protocol":"bgp", + "selected":true, + "destSelected":true, "distance":200, "metric":0, + "installed":true, "table":254, - "internalStatus":0, - "internalFlags":5, - "internalNextHopNum":2, - "internalNextHopActiveNum":0, + "internalStatus":16, + "internalFlags":13, "nexthops":[ { - "flags":0, + "flags":5, "ip":"192.168.2.1", - "afi":"ipv4" + "afi":"ipv4", + "active":true, + "recursive":true }, { - "flags":0, - "ip":"192.168.5.1", - "afi":"ipv4" + "flags":3, + "fib":true, + "ip":"192.168.4.3", + "afi":"ipv4", + "interfaceName":"tor2-eth1", + "active":true } ] } @@ -36,22 +42,14 @@ "table":254, "internalStatus":16, "internalFlags":13, - "internalNextHopNum":2, - "internalNextHopActiveNum":1, "nexthops":[ { "flags":3, "fib":true, "ip":"192.168.4.3", "afi":"ipv4", - "interfaceIndex":3, "interfaceName":"tor2-eth1", "active":true - }, - { - "flags":0, - "ip":"192.168.5.1", - "afi":"ipv4" } ] } @@ -68,14 +66,11 @@ "table":254, "internalStatus":16, "internalFlags":8, - "internalNextHopNum":1, - "internalNextHopActiveNum":1, "nexthops":[ { "flags":3, "fib":true, "directlyConnected":true, - "interfaceIndex":2, "interfaceName":"tor2-eth0", "active":true } @@ -94,23 +89,20 @@ "table":254, "internalStatus":16, "internalFlags":8, - "internalNextHopNum":1, - "internalNextHopActiveNum":1, "nexthops":[ { "flags":3, "fib":true, "directlyConnected":true, - "interfaceIndex":3, "interfaceName":"tor2-eth1", "active":true } ] } ], - "192.168.5.0\/24":[ + "192.168.5.1\/32":[ { - "prefix":"192.168.5.0\/24", + "prefix":"192.168.5.1\/32", "protocol":"bgp", "selected":true, "destSelected":true, @@ -120,29 +112,28 @@ "table":254, "internalStatus":16, "internalFlags":13, - "internalNextHopNum":2, - "internalNextHopActiveNum":1, "nexthops":[ { - "flags":0, + "flags":5, "ip":"192.168.2.1", - "afi":"ipv4" + "afi":"ipv4", + "active":true, + "recursive":true }, { "flags":3, "fib":true, - "ip":"192.168.6.4", + "ip":"192.168.4.3", "afi":"ipv4", - "interfaceIndex":4, - "interfaceName":"tor2-eth2", + "interfaceName":"tor2-eth1", "active":true } ] } ], - "192.168.6.0\/24":[ + "192.168.6.2\/32":[ { - "prefix":"192.168.6.0\/24", + "prefix":"192.168.6.2\/32", "protocol":"connected", "selected":true, "destSelected":true, @@ -152,15 +143,12 @@ "table":254, "internalStatus":16, "internalFlags":8, - "internalNextHopNum":1, - "internalNextHopActiveNum":1, "nexthops":[ { "flags":3, "fib":true, "directlyConnected":true, - "interfaceIndex":4, - "interfaceName":"tor2-eth2", + "interfaceName":"lo", "active":true } ] diff --git a/tests/topotests/bgp_rr_ibgp/tor2/zebra.conf b/tests/topotests/bgp_rr_ibgp/tor2/zebra.conf index 3318cbb196..e1a06b14fc 100644 --- a/tests/topotests/bgp_rr_ibgp/tor2/zebra.conf +++ b/tests/topotests/bgp_rr_ibgp/tor2/zebra.conf @@ -9,5 +9,5 @@ int tor2-eth1 ip addr 192.168.4.2/24 -int tor2-eth2 - ip addr 192.168.6.2/24 +int lo + ip addr 192.168.6.2/32 diff --git a/tests/topotests/pytest.ini b/tests/topotests/pytest.ini index 62c825341f..ade5bfd501 100644 --- a/tests/topotests/pytest.ini +++ b/tests/topotests/pytest.ini @@ -1,6 +1,6 @@ # Skip pytests example directory [pytest] -norecursedirs = .git example-test example-topojson-test lib docker bgp_rr_ibgp +norecursedirs = .git example-test example-topojson-test lib docker [topogen] # Default configuration values |
