summaryrefslogtreecommitdiffstats
path: root/tests/topotests
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2019-02-13 15:32:43 +0100
committerGitHub <noreply@github.com>2019-02-13 15:32:43 +0100
commit01490ba25da576ec0a72c896559ebc6fa71484be (patch)
tree9287f86d7d98c1a7c274e00d5c314cd7cdb8c2a3 /tests/topotests
parentMerge pull request #3778 from mjstapp/fix_dplane_update (diff)
parentbgp_l3vpn_to_bgp_vrf: verify TCP l3mdev set as expected (diff)
downloadfrr-01490ba25da576ec0a72c896559ebc6fa71484be.tar.xz
frr-01490ba25da576ec0a72c896559ebc6fa71484be.zip
Merge pull request #3753 from LabNConsulting/working/master/topotest-l3mdev=1
topotest: bgp_l3vpn_to_bgp_vrf: fix setting of TCP l3mdev
Diffstat (limited to 'tests/topotests')
-rw-r--r--tests/topotests/bgp_l3vpn_to_bgp_vrf/customize.py7
-rw-r--r--tests/topotests/bgp_l3vpn_to_bgp_vrf/scripts/check_linux_vrf.py11
2 files changed, 11 insertions, 7 deletions
diff --git a/tests/topotests/bgp_l3vpn_to_bgp_vrf/customize.py b/tests/topotests/bgp_l3vpn_to_bgp_vrf/customize.py
index 31e23faed..ce542413b 100644
--- a/tests/topotests/bgp_l3vpn_to_bgp_vrf/customize.py
+++ b/tests/topotests/bgp_l3vpn_to_bgp_vrf/customize.py
@@ -141,7 +141,10 @@ class ThisTestTopo(Topo):
switch[1].add_link(tgen.gears['r2'], nodeif='r2-eth2')
switch[1].add_link(tgen.gears['r3'], nodeif='r3-eth1')
+l3mdev_accept = 0
+
def ltemplatePreRouterStartHook():
+ global l3mdev_accept
cc = ltemplateRtrCmd()
krel = platform.release()
tgen = get_topogen()
@@ -172,7 +175,7 @@ def ltemplatePreRouterStartHook():
'ip ru add oif {0}-cust1 table 10',
'ip ru add iif {0}-cust1 table 10',
'ip link set dev {0}-cust1 up',
- 'sysctl -w net.ipv4.udp_l3mdev_accept={}'.format(l3mdev_accept)]
+ 'sysctl -w net.ipv4.tcp_l3mdev_accept={}'.format(l3mdev_accept)]
for rtr in rtrs:
router = tgen.gears[rtr]
for cmd in cmds:
@@ -202,7 +205,7 @@ def ltemplatePreRouterStartHook():
'ip ru add oif {0}-cust2 table 20',
'ip ru add iif {0}-cust2 table 20',
'ip link set dev {0}-cust2 up',
- 'sysctl -w net.ipv4.udp_l3mdev_accept={}'.format(l3mdev_accept)]
+ 'sysctl -w net.ipv4.tcp_l3mdev_accept={}'.format(l3mdev_accept)]
for rtr in rtrs:
for cmd in cmds:
cc.doCmd(tgen, rtr, cmd.format(rtr))
diff --git a/tests/topotests/bgp_l3vpn_to_bgp_vrf/scripts/check_linux_vrf.py b/tests/topotests/bgp_l3vpn_to_bgp_vrf/scripts/check_linux_vrf.py
index 778d50404..f5d73a8c4 100644
--- a/tests/topotests/bgp_l3vpn_to_bgp_vrf/scripts/check_linux_vrf.py
+++ b/tests/topotests/bgp_l3vpn_to_bgp_vrf/scripts/check_linux_vrf.py
@@ -1,11 +1,12 @@
from lutil import luCommand
-
-rtrs = ['r1', 'r3', 'r4', 'ce1', 'ce2', 'ce3', 'ce4']
-for rtr in rtrs:
+from customize import l3mdev_accept
+l3mdev_rtrs = ['r1', 'r3', 'r4', 'ce4']
+for rtr in l3mdev_rtrs:
luCommand(rtr,'sysctl net.ipv4.tcp_l3mdev_accept',' = \d*','none','')
found = luLast()
- luCommand(rtr,'ss -aep',':bgp','pass','IPv4:bgp, l3mdev%s' % found.group(0))
- luCommand(rtr,'ss -aep',':.:bgp','pass','IPv6:bgp')
+ luCommand(rtr,'ss -naep',':179','pass','IPv4:bgp, l3mdev{}'.format(found.group(0)))
+ luCommand(rtr,'ss -naep',':.*:179','pass','IPv6:bgp')
+ luCommand(rtr,'sysctl net.ipv4.tcp_l3mdev_accept',' = {}'.format(l3mdev_accept),'pass','l3mdev matches expected (real/expected{}/{})'.format(found.group(0),l3mdev_accept))
rtrs = ['r1', 'r3', 'r4']
for rtr in rtrs: