summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/topotests/bgp_route_map_match_ipv6_nexthop/__init__.py (renamed from tests/topotests/bgp_route_map_match_ipv6_nexthop_access_list/__init__.py)0
-rw-r--r--tests/topotests/bgp_route_map_match_ipv6_nexthop/r1/bgpd.conf (renamed from tests/topotests/bgp_route_map_match_ipv6_nexthop_access_list/r1/bgpd.conf)5
-rw-r--r--tests/topotests/bgp_route_map_match_ipv6_nexthop/r1/zebra.conf (renamed from tests/topotests/bgp_route_map_match_ipv6_nexthop_access_list/r1/zebra.conf)0
-rw-r--r--tests/topotests/bgp_route_map_match_ipv6_nexthop/r2/bgpd.conf (renamed from tests/topotests/bgp_route_map_match_ipv6_nexthop_access_list/r2/bgpd.conf)4
-rw-r--r--tests/topotests/bgp_route_map_match_ipv6_nexthop/r2/zebra.conf (renamed from tests/topotests/bgp_route_map_match_ipv6_nexthop_access_list/r2/zebra.conf)1
-rw-r--r--tests/topotests/bgp_route_map_match_ipv6_nexthop/test_bgp_route_map_match_ipv6_nexthop.py (renamed from tests/topotests/bgp_route_map_match_ipv6_nexthop_access_list/test_bgp_route_map_match_ipv6_nexthop_access_list.py)7
6 files changed, 16 insertions, 1 deletions
diff --git a/tests/topotests/bgp_route_map_match_ipv6_nexthop_access_list/__init__.py b/tests/topotests/bgp_route_map_match_ipv6_nexthop/__init__.py
index e69de29bb2..e69de29bb2 100644
--- a/tests/topotests/bgp_route_map_match_ipv6_nexthop_access_list/__init__.py
+++ b/tests/topotests/bgp_route_map_match_ipv6_nexthop/__init__.py
diff --git a/tests/topotests/bgp_route_map_match_ipv6_nexthop_access_list/r1/bgpd.conf b/tests/topotests/bgp_route_map_match_ipv6_nexthop/r1/bgpd.conf
index 5f35d353f4..c2a49252d6 100644
--- a/tests/topotests/bgp_route_map_match_ipv6_nexthop_access_list/r1/bgpd.conf
+++ b/tests/topotests/bgp_route_map_match_ipv6_nexthop/r1/bgpd.conf
@@ -3,6 +3,8 @@ ipv6 access-list nh1 permit 2001:db8:1::/64
ipv6 access-list nh2 permit 2001:db8:2::/64
ipv6 access-list nh3 permit 2001:db8:3::/64
!
+ipv6 prefix-list nh4 permit 2001:db8:5::/64 le 128
+!
router bgp 65001
bgp router-id 10.10.10.1
no bgp ebgp-requires-policy
@@ -24,4 +26,7 @@ route-map r2 permit 30
route-map r2 permit 40
match ipv6 next-hop address 2001:db8:4::1
set community 65002:4
+route-map r2 permit 50
+ match ipv6 next-hop prefix-list nh4
+ set community 65002:5
!
diff --git a/tests/topotests/bgp_route_map_match_ipv6_nexthop_access_list/r1/zebra.conf b/tests/topotests/bgp_route_map_match_ipv6_nexthop/r1/zebra.conf
index 1d4374bd8f..1d4374bd8f 100644
--- a/tests/topotests/bgp_route_map_match_ipv6_nexthop_access_list/r1/zebra.conf
+++ b/tests/topotests/bgp_route_map_match_ipv6_nexthop/r1/zebra.conf
diff --git a/tests/topotests/bgp_route_map_match_ipv6_nexthop_access_list/r2/bgpd.conf b/tests/topotests/bgp_route_map_match_ipv6_nexthop/r2/bgpd.conf
index bca67c5363..19dcf3664b 100644
--- a/tests/topotests/bgp_route_map_match_ipv6_nexthop_access_list/r2/bgpd.conf
+++ b/tests/topotests/bgp_route_map_match_ipv6_nexthop/r2/bgpd.conf
@@ -13,6 +13,7 @@ ipv6 prefix-list p1 permit 2001:db8:1::1/128
ipv6 prefix-list p2 permit 2001:db8:2::1/128
ipv6 prefix-list p3 permit 2001:db8:3::1/128
ipv6 prefix-list p4 permit 2001:db8:4::1/128
+ipv6 prefix-list p5 permit 2001:db8:5::1/128
!
route-map r1 permit 10
match ipv6 address prefix-list p1
@@ -26,4 +27,7 @@ route-map r1 permit 30
route-map r1 permit 40
match ipv6 address prefix-list p4
set ipv6 next-hop global 2001:db8:4::1
+route-map r1 permit 50
+ match ipv6 address prefix-list p5
+ set ipv6 next-hop global 2001:db8:5::1
!
diff --git a/tests/topotests/bgp_route_map_match_ipv6_nexthop_access_list/r2/zebra.conf b/tests/topotests/bgp_route_map_match_ipv6_nexthop/r2/zebra.conf
index 9039f1dec1..e69345f4f6 100644
--- a/tests/topotests/bgp_route_map_match_ipv6_nexthop_access_list/r2/zebra.conf
+++ b/tests/topotests/bgp_route_map_match_ipv6_nexthop/r2/zebra.conf
@@ -4,6 +4,7 @@ int lo
ipv6 address 2001:db8:2::1/128
ipv6 address 2001:db8:3::1/128
ipv6 address 2001:db8:4::1/128
+ ipv6 address 2001:db8:5::1/128
!
int r2-eth0
ip address 2001:db8::2/64
diff --git a/tests/topotests/bgp_route_map_match_ipv6_nexthop_access_list/test_bgp_route_map_match_ipv6_nexthop_access_list.py b/tests/topotests/bgp_route_map_match_ipv6_nexthop/test_bgp_route_map_match_ipv6_nexthop.py
index 3efe1eca76..8c86526bf1 100644
--- a/tests/topotests/bgp_route_map_match_ipv6_nexthop_access_list/test_bgp_route_map_match_ipv6_nexthop_access_list.py
+++ b/tests/topotests/bgp_route_map_match_ipv6_nexthop/test_bgp_route_map_match_ipv6_nexthop.py
@@ -20,7 +20,7 @@
"""
Test if we can match BGP prefixes by next-hop which is
-specified by an IPv6 Access-list.
+specified by an IPv6 Access-list, prefix-list or just an address.
"""
import os
@@ -103,6 +103,11 @@ def test_bgp_route_map_match_ipv6_next_hop_access_list():
"communities": "65002:4",
}
],
+ "2001:db8:5::1/128": [
+ {
+ "communities": "65002:5",
+ }
+ ],
}
return topotest.json_cmp(output, expected)