]> git.proxmox.com Git - mirror_frr.git/blobdiff - tests/topotests/bgp_l3vpn_to_bgp_vrf/customize.py
topotest: bgp_l3vpn_to_bgp_vrf put ce4 into vrf (without a default)
[mirror_frr.git] / tests / topotests / bgp_l3vpn_to_bgp_vrf / customize.py
index 596701cee2bf12838befc9039709afeead47c21d..31e23faededae782ce136eca4c444c23fa677b91 100644 (file)
@@ -196,7 +196,18 @@ def ltemplatePreRouterStartHook():
         for intf in intfs:
             cc.doCmd(tgen, rtr, 'echo 1 > /proc/sys/net/mpls/conf/{}/input'.format(intf))
         logger.info('setup {0} vrf {0}-cust2, {0}-eth5. enabled mpls input.'.format(rtr))
-    if cc.getOutput() != 3:
+    #put ce4-eth0 into a VRF (no default instance!)
+    rtrs = ['ce4']
+    cmds = ['ip link add {0}-cust2 type vrf table 20',
+            '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)]
+    for rtr in rtrs:
+        for cmd in cmds:
+            cc.doCmd(tgen, rtr, cmd.format(rtr))
+        cc.doCmd(tgen, rtr, 'ip link set dev {0}-eth0 master {0}-cust2'.format(rtr))
+    if cc.getOutput() != 4:
         InitSuccess = False
         logger.info('Unexpected output seen ({} times, tests will be skipped'.format(cc.getOutput()))
     else: