Lines Matching +full:6 +full:a
13 # 6. VRF and non-VRF permutations
16 # ns-A | ns-B
23 # ns-A:
35 # ns-A to ns-C connection - only for VRF and same config
36 # as ns-A to ns-B
38 # server / client nomenclature relative to ns-A
85 NSA=ns-A
115 read a
116 [ "$a" = "q" ] && exit 1
123 read a
124 [ "$a" = "q" ] && exit 1
204 if [ "$VERBOSE" = "1" -a -n "$out" ]; then
242 read a
264 read a
286 read a
292 # set sysctl values in NS-A
300 # get sysctl values in NS-A
318 ${NSA_IP}) echo "ns-A IP";;
319 ${NSA_IP6}) echo "ns-A IPv6";;
320 ${NSA_LO_IP}) echo "ns-A loopback IP";;
321 ${NSA_LO_IP6}) echo "ns-A loopback IPv6";;
322 ${NSA_LINKIP6}|${NSA_LINKIP6}%*) echo "ns-A IPv6 LLA";;
348 addr=$(ip -netns ${ns} -6 -br addr show dev ${dev} | \
379 ip -netns ${ns} -6 route add vrf ${vrf} unreachable default metric 8192
382 ip -netns ${ns} -6 addr add ::1 dev ${vrf} nodad
387 ip -netns ${ns} -6 addr add dev ${vrf} ${addr6}
392 ip -netns ${ns} -6 ru del pref 0
393 ip -netns ${ns} -6 ru add pref 32765 from all lookup local
409 ip -netns ${ns} -6 addr add dev lo ${addr6}
413 ip -netns ${ns} -6 ro add unreachable default metric 8192
429 local ns2_dev=$6
458 ip -netns ${NSA} -6 addr flush dev ${NSA_DEV}
482 # ns-B but for a device NOT in the VRF
492 # make sure we are starting with a clean slate
507 # tell ns-A how to get to remote addresses of ns-B
513 ip -netns ${NSA} -6 ro add vrf ${VRF} ${NSB_LO_IP6}/128 via ${NSB_IP6} dev ${NSA_DEV}
516 ip -netns ${NSB} -6 ro add ${VRF_IP6}/128 via ${NSA_IP6} dev ${NSB_DEV}
523 # tell ns-B how to get to remote addresses of ns-A
534 # make sure we are starting with a clean slate
567 local a
572 for a in ${NSB_IP} ${NSB_LO_IP}
575 run_cmd ping -c1 -w1 ${a}
576 log_test_addr ${a} $? 0 "ping out"
579 run_cmd ping -c1 -w1 -I ${NSA_DEV} ${a}
580 log_test_addr ${a} $? 0 "ping out, device bind"
583 run_cmd ping -c1 -w1 -I ${NSA_LO_IP} ${a}
584 log_test_addr ${a} $? 0 "ping out, address bind"
590 for a in ${NSA_IP} ${NSA_LO_IP}
593 run_cmd_nsb ping -c1 -w1 ${a}
594 log_test_addr ${a} $? 0 "ping in"
600 for a in ${NSA_IP} ${NSA_LO_IP} 127.0.0.1
603 run_cmd ping -c1 -w1 ${a}
604 log_test_addr ${a} $? 0 "ping local"
611 a=${NSA_IP}
613 run_cmd ping -c1 -w1 -I ${NSA_DEV} ${a}
614 log_test_addr ${a} $? 0 "ping local, device bind"
617 # fails in a really weird way though because ipv4 special cases
619 for a in ${NSA_LO_IP} 127.0.0.1
623 run_cmd ping -c1 -w1 -I ${NSA_DEV} ${a}
624 log_test_addr ${a} $? 1 "ping local, device bind"
636 a=${NSB_LO_IP}
637 run_cmd ping -c1 -w1 ${a}
638 log_test_addr ${a} $? 2 "ping out, blocked by rule"
641 # a viable rtable if the oif (e.g., bind to device) is set, so this
643 # run_cmd ping -c1 -w1 -I ${NSA_DEV} ${a}
645 a=${NSA_LO_IP}
648 run_cmd_nsb ping -c1 -w1 ${a}
649 log_test_addr ${a} $? 1 "ping in, blocked by rule"
664 a=${NSB_LO_IP}
665 run_cmd ping -c1 -w1 ${a}
666 log_test_addr ${a} $? 2 "ping out, blocked by route"
669 # a viable rtable if the oif (e.g., bind to device) is set, so this
670 # case succeeds despite not having a route for the address
671 # run_cmd ping -c1 -w1 -I ${NSA_DEV} ${a}
673 a=${NSA_LO_IP}
676 run_cmd_nsb ping -c1 -w1 ${a}
677 log_test_addr ${a} $? 1 "ping in, blocked by route"
685 a=${NSB_LO_IP}
686 run_cmd ping -c1 -w1 ${a}
687 log_test_addr ${a} $? 2 "ping out, unreachable default route"
690 # a viable rtable if the oif (e.g., bind to device) is set, so this
691 # case succeeds despite not having a route for the address
692 # run_cmd ping -c1 -w1 -I ${NSA_DEV} ${a}
697 local a
705 for a in ${NSB_IP} ${NSB_LO_IP}
708 run_cmd ping -c1 -w1 -I ${VRF} ${a}
709 log_test_addr ${a} $? 0 "ping out, VRF bind"
712 run_cmd ping -c1 -w1 -I ${NSA_DEV} ${a}
713 log_test_addr ${a} $? 0 "ping out, device bind"
716 run_cmd ip vrf exec ${VRF} ping -c1 -w1 -I ${NSA_IP} ${a}
717 log_test_addr ${a} $? 0 "ping out, vrf device + dev address bind"
720 run_cmd ip vrf exec ${VRF} ping -c1 -w1 -I ${VRF_IP} ${a}
721 log_test_addr ${a} $? 0 "ping out, vrf device + vrf address bind"
727 for a in ${NSA_IP} ${VRF_IP}
730 run_cmd_nsb ping -c1 -w1 ${a}
731 log_test_addr ${a} $? 0 "ping in"
737 for a in ${NSA_IP} ${VRF_IP} 127.0.0.1
740 show_hint "Source address should be ${a}"
741 run_cmd ping -c1 -w1 -I ${VRF} ${a}
742 log_test_addr ${a} $? 0 "ping local, VRF bind"
749 a=${NSA_IP}
751 run_cmd ping -c1 -w1 -I ${NSA_DEV} ${a}
752 log_test_addr ${a} $? 0 "ping local, device bind"
755 for a in ${VRF_IP} 127.0.0.1
759 run_cmd ping -c1 -w1 -I ${NSA_DEV} ${a}
760 log_test_addr ${a} $? 2 "ping local, device bind"
770 a=${NSB_LO_IP}
771 run_cmd ping -c1 -w1 -I ${VRF} ${a}
772 log_test_addr ${a} $? 2 "ping out, vrf bind, blocked by rule"
775 run_cmd ping -c1 -w1 -I ${NSA_DEV} ${a}
776 log_test_addr ${a} $? 2 "ping out, device bind, blocked by rule"
778 a=${NSA_LO_IP}
781 run_cmd_nsb ping -c1 -w1 ${a}
782 log_test_addr ${a} $? 1 "ping in, blocked by rule"
794 a=${NSB_LO_IP}
795 run_cmd ping -c1 -w1 -I ${VRF} ${a}
796 log_test_addr ${a} $? 2 "ping out, vrf bind, unreachable route"
799 run_cmd ping -c1 -w1 -I ${NSA_DEV} ${a}
800 log_test_addr ${a} $? 2 "ping out, device bind, unreachable route"
802 a=${NSA_LO_IP}
805 run_cmd_nsb ping -c1 -w1 ${a}
806 log_test_addr ${a} $? 1 "ping in, unreachable route"
971 # duplicate config between default VRF and a VRF
1039 log_test $? 1 "MD5: VRF: Device must be a VRF - single address"
1043 log_test $? 1 "MD5: VRF: Device must be a VRF - prefix"
1103 local a
1108 for a in ${NSA_IP} ${NSA_LO_IP}
1113 run_cmd_nsb nettest -r ${a}
1114 log_test_addr ${a} $? 0 "Global server"
1117 a=${NSA_IP}
1121 run_cmd_nsb nettest -r ${a}
1122 log_test_addr ${a} $? 0 "Device server"
1125 for a in ${NSA_IP} ${NSA_LO_IP}
1129 run_cmd_nsb nettest -r ${a}
1130 log_test_addr ${a} $? 1 "No server"
1136 for a in ${NSB_IP} ${NSB_LO_IP}
1141 run_cmd nettest -r ${a} -0 ${NSA_IP}
1142 log_test_addr ${a} $? 0 "Client"
1147 run_cmd nettest -r ${a} -d ${NSA_DEV}
1148 log_test_addr ${a} $? 0 "Client, device bind"
1152 run_cmd nettest -r ${a}
1153 log_test_addr ${a} $? 1 "No server, unbound client"
1157 run_cmd nettest -r ${a} -d ${NSA_DEV}
1158 log_test_addr ${a} $? 1 "No server, device client"
1164 for a in ${NSA_IP} ${NSA_LO_IP} 127.0.0.1
1169 run_cmd nettest -r ${a} -0 ${a} -1 ${a}
1170 log_test_addr ${a} $? 0 "Global server, local connection"
1173 a=${NSA_IP}
1177 run_cmd nettest -r ${a} -0 ${a}
1178 log_test_addr ${a} $? 0 "Device server, unbound client, local connection"
1180 for a in ${NSA_LO_IP} 127.0.0.1
1186 run_cmd nettest -r ${a}
1187 log_test_addr ${a} $? 1 "Device server, unbound client, local connection"
1190 a=${NSA_IP}
1194 run_cmd nettest -r ${a} -0 ${a} -d ${NSA_DEV}
1195 log_test_addr ${a} $? 0 "Global server, device client, local connection"
1197 for a in ${NSA_LO_IP} 127.0.0.1
1203 run_cmd nettest -r ${a} -d ${NSA_DEV}
1204 log_test_addr ${a} $? 1 "Global server, device client, local connection"
1207 a=${NSA_IP}
1211 run_cmd nettest -d ${NSA_DEV} -r ${a} -0 ${a}
1212 log_test_addr ${a} $? 0 "Device server, device client, local connection"
1216 run_cmd nettest -d ${NSA_DEV} -r ${a}
1217 log_test_addr ${a} $? 1 "No server, device client, local conn"
1224 local a
1234 for a in ${NSA_IP} ${VRF_IP}
1240 run_cmd_nsb nettest -r ${a}
1241 log_test_addr ${a} $? 1 "Global server"
1246 run_cmd_nsb nettest -r ${a}
1247 log_test_addr ${a} $? 0 "VRF server"
1252 run_cmd_nsb nettest -r ${a}
1253 log_test_addr ${a} $? 0 "Device server"
1258 run_cmd_nsb nettest -r ${a}
1259 log_test_addr ${a} $? 1 "No server"
1264 a=${NSA_IP}
1269 run_cmd nettest -r ${a} -d ${NSA_DEV}
1270 log_test_addr ${a} $? 1 "Global server, local connection"
1283 for a in ${NSA_IP} ${VRF_IP}
1289 run_cmd_nsb nettest -r ${a}
1290 log_test_addr ${a} $? 0 "Global server"
1296 run_cmd_nsb nettest -r ${a}
1297 log_test_addr ${a} $? 0 "VRF server"
1302 run_cmd_nsb nettest -r ${a}
1303 log_test_addr ${a} $? 1 "No server"
1306 a=${NSA_IP}
1311 run_cmd_nsb nettest -r ${a}
1312 log_test_addr ${a} $? 0 "Device server"
1315 for a in ${NSA_IP} ${VRF_IP}
1321 run_cmd nettest -r ${a}
1322 log_test_addr ${a} $? 1 "Global server, local connection"
1328 for a in ${NSB_IP} ${NSB_LO_IP}
1333 run_cmd nettest -r ${a} -d ${VRF}
1334 log_test_addr ${a} $? 0 "Client, VRF bind"
1339 run_cmd nettest -r ${a} -d ${NSA_DEV}
1340 log_test_addr ${a} $? 0 "Client, device bind"
1344 run_cmd nettest -r ${a} -d ${VRF}
1345 log_test_addr ${a} $? 1 "No server, VRF client"
1349 run_cmd nettest -r ${a} -d ${NSA_DEV}
1350 log_test_addr ${a} $? 1 "No server, device client"
1353 for a in ${NSA_IP} ${VRF_IP} 127.0.0.1
1358 run_cmd nettest -r ${a} -d ${VRF} -0 ${a}
1359 log_test_addr ${a} $? 0 "VRF server, VRF client, local connection"
1362 a=${NSA_IP}
1366 run_cmd nettest -r ${a} -d ${NSA_DEV} -0 ${a}
1367 log_test_addr ${a} $? 0 "VRF server, device client, local connection"
1373 run_cmd nettest -r ${a}
1374 log_test_addr ${a} $? 1 "VRF server, unbound client, local connection"
1379 run_cmd nettest -r ${a} -d ${VRF} -0 ${a}
1380 log_test_addr ${a} $? 0 "Device server, VRF client, local connection"
1385 run_cmd nettest -r ${a} -d ${NSA_DEV} -0 ${a}
1386 log_test_addr ${a} $? 0 "Device server, device client, local connection"
1414 local a
1419 for a in ${NSA_IP} ${NSA_LO_IP}
1424 run_cmd_nsb nettest -D -r ${a}
1425 log_test_addr ${a} $? 0 "Global server"
1429 run_cmd_nsb nettest -D -r ${a}
1430 log_test_addr ${a} $? 1 "No server"
1433 a=${NSA_IP}
1437 run_cmd_nsb nettest -D -r ${a}
1438 log_test_addr ${a} $? 0 "Device server"
1443 for a in ${NSB_IP} ${NSB_LO_IP}
1448 run_cmd nettest -D -r ${a} -0 ${NSA_IP}
1449 log_test_addr ${a} $? 0 "Client"
1454 run_cmd nettest -D -r ${a} -d ${NSA_DEV} -0 ${NSA_IP}
1455 log_test_addr ${a} $? 0 "Client, device bind"
1460 run_cmd nettest -D -r ${a} -d ${NSA_DEV} -C -0 ${NSA_IP}
1461 log_test_addr ${a} $? 0 "Client, device send via cmsg"
1466 run_cmd nettest -D -r ${a} -d ${NSA_DEV} -S -0 ${NSA_IP}
1467 log_test_addr ${a} $? 0 "Client, device bind via IP_UNICAST_IF"
1472 run_cmd nettest -D -r ${a} -d ${NSA_DEV} -S -0 ${NSA_IP} -U
1473 log_test_addr ${a} $? 0 "Client, device bind via IP_UNICAST_IF, with connect()"
1478 run_cmd nettest -D -r ${a}
1479 log_test_addr ${a} $? 1 "No server, unbound client"
1483 run_cmd nettest -D -r ${a} -d ${NSA_DEV}
1484 log_test_addr ${a} $? 1 "No server, device client"
1490 for a in ${NSA_IP} ${NSA_LO_IP} 127.0.0.1
1495 run_cmd nettest -D -r ${a} -0 ${a} -1 ${a}
1496 log_test_addr ${a} $? 0 "Global server, local connection"
1499 a=${NSA_IP}
1503 run_cmd nettest -D -r ${a}
1504 log_test_addr ${a} $? 0 "Device server, unbound client, local connection"
1506 for a in ${NSA_LO_IP} 127.0.0.1
1512 run_cmd nettest -D -r ${a}
1513 log_test_addr ${a} $? 1 "Device server, unbound client, local connection"
1516 a=${NSA_IP}
1520 run_cmd nettest -D -d ${NSA_DEV} -r ${a}
1521 log_test_addr ${a} $? 0 "Global server, device client, local connection"
1526 run_cmd nettest -D -d ${NSA_DEV} -C -r ${a}
1527 log_test_addr ${a} $? 0 "Global server, device send via cmsg, local connection"
1532 run_cmd nettest -D -d ${NSA_DEV} -S -r ${a}
1533 log_test_addr ${a} $? 0 "Global server, device client via IP_UNICAST_IF, local connection"
1538 run_cmd nettest -D -d ${NSA_DEV} -S -r ${a} -U
1539 …log_test_addr ${a} $? 0 "Global server, device client via IP_UNICAST_IF, local connection, with co…
1545 for a in ${NSA_LO_IP} 127.0.0.1
1551 run_cmd nettest -D -r ${a} -d ${NSA_DEV}
1552 log_test_addr ${a} $? 2 "Global server, device client, local connection"
1558 run_cmd nettest -D -r ${a} -d ${NSA_DEV} -C
1559 log_test_addr ${a} $? 1 "Global server, device send via cmsg, local connection"
1565 run_cmd nettest -D -r ${a} -d ${NSA_DEV} -S
1566 log_test_addr ${a} $? 1 "Global server, device client via IP_UNICAST_IF, local connection"
1572 run_cmd nettest -D -r ${a} -d ${NSA_DEV} -S -U
1573 …log_test_addr ${a} $? 1 "Global server, device client via IP_UNICAST_IF, local connection, with co…
1578 a=${NSA_IP}
1582 run_cmd nettest -D -d ${NSA_DEV} -r ${a} -0 ${a}
1583 log_test_addr ${a} $? 0 "Device server, device client, local conn"
1586 run_cmd nettest -D -d ${NSA_DEV} -r ${a}
1587 log_test_addr ${a} $? 2 "No server, device client, local conn"
1592 local a
1601 for a in ${NSA_IP} ${VRF_IP}
1604 show_hint "Fails because ingress is in a VRF and global server is disabled"
1607 run_cmd_nsb nettest -D -r ${a}
1608 log_test_addr ${a} $? 1 "Global server"
1613 run_cmd_nsb nettest -D -r ${a}
1614 log_test_addr ${a} $? 0 "VRF server"
1619 run_cmd_nsb nettest -D -r ${a}
1620 log_test_addr ${a} $? 0 "Enslaved device server"
1624 run_cmd_nsb nettest -D -r ${a}
1625 log_test_addr ${a} $? 1 "No server"
1631 run_cmd nettest -D -d ${VRF} -r ${a}
1632 log_test_addr ${a} $? 1 "Global server, VRF client, local connection"
1635 a=${NSA_IP}
1639 run_cmd nettest -D -d ${VRF} -r ${a}
1640 log_test_addr ${a} $? 0 "VRF server, VRF client, local conn"
1645 run_cmd nettest -D -d ${NSA_DEV} -r ${a}
1646 log_test_addr ${a} $? 0 "VRF server, enslaved device client, local connection"
1648 a=${NSA_IP}
1652 run_cmd nettest -D -d ${VRF} -r ${a}
1653 log_test_addr ${a} $? 0 "Enslaved device server, VRF client, local conn"
1658 run_cmd nettest -D -d ${NSA_DEV} -r ${a}
1659 log_test_addr ${a} $? 0 "Enslaved device server, device client, local conn"
1668 for a in ${NSA_IP} ${VRF_IP}
1673 run_cmd_nsb nettest -D -r ${a}
1674 log_test_addr ${a} $? 0 "Global server"
1679 run_cmd_nsb nettest -D -r ${a}
1680 log_test_addr ${a} $? 0 "VRF server"
1685 run_cmd_nsb nettest -D -r ${a}
1686 log_test_addr ${a} $? 0 "Enslaved device server"
1690 run_cmd_nsb nettest -D -r ${a}
1691 log_test_addr ${a} $? 1 "No server"
1723 a=${NSA_IP}
1727 run_cmd nettest -D -d ${VRF} -r ${a}
1728 log_test_addr ${a} $? 0 "Global server, VRF client, local conn"
1733 run_cmd nettest -D -d ${VRF} -r ${a}
1734 log_test_addr ${a} $? 0 "VRF server, VRF client, local conn"
1739 run_cmd nettest -D -d ${NSA_DEV} -r ${a}
1740 log_test_addr ${a} $? 0 "VRF server, device client, local conn"
1745 run_cmd nettest -D -d ${VRF} -r ${a}
1746 log_test_addr ${a} $? 0 "Enslaved device server, VRF client, local conn"
1751 run_cmd nettest -D -d ${NSA_DEV} -r ${a}
1752 log_test_addr ${a} $? 0 "Enslaved device server, device client, local conn"
1754 for a in ${VRF_IP} 127.0.0.1
1759 run_cmd nettest -D -d ${VRF} -r ${a}
1760 log_test_addr ${a} $? 0 "Global server, VRF client, local conn"
1763 for a in ${VRF_IP} 127.0.0.1
1768 run_cmd nettest -D -d ${VRF} -r ${a}
1769 log_test_addr ${a} $? 0 "VRF server, VRF client, local conn"
1774 for a in ${NSA_IP} ${VRF_IP} 127.0.0.1
1778 run_cmd nettest -D -d ${VRF} -r ${a}
1779 log_test_addr ${a} $? 1 "No server, VRF client, local conn"
1814 for a in ${NSA_IP} ${NSA_LO_IP}
1817 run_cmd nettest -s -R -P icmp -l ${a} -b
1818 log_test_addr ${a} $? 0 "Raw socket bind to local address"
1821 run_cmd nettest -s -R -P icmp -l ${a} -I ${NSA_DEV} -b
1822 log_test_addr ${a} $? 0 "Raw socket bind to local address after device bind"
1828 a=${NL_IP}
1830 run_cmd nettest -s -R -f -l ${a} -b
1831 log_test_addr ${a} $? 0 "Raw socket bind to nonlocal address"
1834 run_cmd nettest -s -f -l ${a} -b
1835 log_test_addr ${a} $? 0 "TCP socket bind to nonlocal address"
1838 run_cmd nettest -s -D -P icmp -f -l ${a} -b
1839 log_test_addr ${a} $? 0 "ICMP socket bind to nonlocal address"
1844 a=${BCAST_IP}
1846 run_cmd nettest -s -D -P icmp -l ${a} -b
1847 log_test_addr ${a} $? 1 "ICMP socket bind to broadcast address"
1849 a=${MCAST_IP}
1851 run_cmd nettest -s -D -P icmp -l ${a} -b
1852 log_test_addr ${a} $? 1 "ICMP socket bind to multicast address"
1857 a=${NSA_IP}
1859 run_cmd nettest -c ${a} -r ${NSB_IP} -t1 -b
1860 log_test_addr ${a} $? 0 "TCP socket bind to local address"
1863 run_cmd nettest -c ${a} -r ${NSB_IP} -d ${NSA_DEV} -t1 -b
1864 log_test_addr ${a} $? 0 "TCP socket bind to local address after device bind"
1866 # Sadly, the kernel allows binding a socket to a device and then
1870 #a=${NSA_LO_IP}
1873 #run_cmd nettest -s -l ${a} -I ${NSA_DEV} -t1 -b
1874 #log_test_addr ${a} $? 1 "TCP socket bind to out of scope local address"
1882 for a in ${NSA_IP} ${VRF_IP}
1886 run_cmd nettest -s -R -P icmp -l ${a} -b
1887 log_test_addr ${a} $? 1 "Raw socket bind to local address"
1890 run_cmd nettest -s -R -P icmp -l ${a} -I ${NSA_DEV} -b
1891 log_test_addr ${a} $? 0 "Raw socket bind to local address after device bind"
1893 run_cmd nettest -s -R -P icmp -l ${a} -I ${VRF} -b
1894 log_test_addr ${a} $? 0 "Raw socket bind to local address after VRF bind"
1897 a=${NSA_LO_IP}
1900 run_cmd nettest -s -R -P icmp -l ${a} -I ${VRF} -b
1901 log_test_addr ${a} $? 1 "Raw socket bind to out of scope address after VRF bind"
1906 a=${NL_IP}
1908 run_cmd nettest -s -R -f -l ${a} -I ${VRF} -b
1909 log_test_addr ${a} $? 0 "Raw socket bind to nonlocal address after VRF bind"
1912 run_cmd nettest -s -f -l ${a} -I ${VRF} -b
1913 log_test_addr ${a} $? 0 "TCP socket bind to nonlocal address after VRF bind"
1916 run_cmd nettest -s -D -P icmp -f -l ${a} -I ${VRF} -b
1917 log_test_addr ${a} $? 0 "ICMP socket bind to nonlocal address after VRF bind"
1922 a=${BCAST_IP}
1924 run_cmd nettest -s -D -P icmp -l ${a} -I ${VRF} -b
1925 log_test_addr ${a} $? 1 "ICMP socket bind to broadcast address after VRF bind"
1927 a=${MCAST_IP}
1929 run_cmd nettest -s -D -P icmp -l ${a} -I ${VRF} -b
1930 log_test_addr ${a} $? 1 "ICMP socket bind to multicast address after VRF bind"
1935 for a in ${NSA_IP} ${VRF_IP}
1938 run_cmd nettest -s -l ${a} -I ${VRF} -t1 -b
1939 log_test_addr ${a} $? 0 "TCP socket bind to local address"
1942 run_cmd nettest -s -l ${a} -I ${NSA_DEV} -t1 -b
1943 log_test_addr ${a} $? 0 "TCP socket bind to local address after device bind"
1946 a=${NSA_LO_IP}
1949 run_cmd nettest -s -l ${a} -I ${VRF} -t1 -b
1950 log_test_addr ${a} $? 1 "TCP socket bind to invalid local address for VRF"
1954 run_cmd nettest -s -l ${a} -I ${NSA_DEV} -t1 -b
1955 log_test_addr ${a} $? 1 "TCP socket bind to invalid local address for device bind"
1981 local a
1986 for a in ${NSA_IP} ${VRF_IP}
1991 run_cmd_nsb nettest ${varg} -r ${a} &
1995 log_test_addr ${a} 0 0 "${desc}, global server"
2000 for a in ${NSA_IP} ${VRF_IP}
2005 run_cmd_nsb nettest ${varg} -r ${a} &
2009 log_test_addr ${a} 0 0 "${desc}, VRF server"
2014 a=${NSA_IP}
2018 run_cmd_nsb nettest ${varg} -r ${a} &
2022 log_test_addr ${a} 0 0 "${desc}, enslaved device server"
2036 log_test_addr ${a} 0 0 "${desc}, VRF client"
2047 log_test_addr ${a} 0 0 "${desc}, enslaved device client"
2054 for a in ${NSA_IP} ${VRF_IP}
2059 run_cmd nettest ${varg} -d ${VRF} -r ${a} &
2063 log_test_addr ${a} 0 0 "${desc}, global server, VRF client, local"
2068 for a in ${NSA_IP} ${VRF_IP}
2073 run_cmd nettest ${varg} -d ${VRF} -r ${a} &
2077 log_test_addr ${a} 0 0 "${desc}, VRF server and client, local"
2082 a=${NSA_IP}
2087 run_cmd nettest ${varg} -d ${NSA_DEV} -r ${a} &
2091 log_test_addr ${a} 0 0 "${desc}, global server, enslaved device client, local"
2098 run_cmd nettest ${varg} -d ${NSA_DEV} -r ${a} &
2102 log_test_addr ${a} 0 0 "${desc}, VRF server, enslaved device client, local"
2109 run_cmd nettest ${varg} -d ${NSA_DEV} -r ${a} &
2113 log_test_addr ${a} 0 0 "${desc}, enslaved device server and client, local"
2119 local a
2121 for a in ${NSA_IP} ${VRF_IP}
2124 run_cmd_nsb ping -f ${a} &
2128 log_test_addr ${a} 0 0 "Device delete with active traffic - ping in"
2133 a=${NSB_IP}
2135 run_cmd ping -f -I ${VRF} ${a} &
2139 log_test_addr ${a} 0 0 "Device delete with active traffic - ping out"
2161 local a
2163 # should not have an impact, but make a known state
2169 for a in ${NSB_IP6} ${NSB_LO_IP6} ${NSB_LINKIP6}%${NSA_DEV} ${MCAST}%${NSA_DEV}
2172 run_cmd ${ping6} -c1 -w1 ${a}
2173 log_test_addr ${a} $? 0 "ping out"
2176 for a in ${NSB_IP6} ${NSB_LO_IP6}
2179 run_cmd ${ping6} -c1 -w1 -I ${NSA_DEV} ${a}
2180 log_test_addr ${a} $? 0 "ping out, device bind"
2183 run_cmd ${ping6} -c1 -w1 -I ${NSA_LO_IP6} ${a}
2184 log_test_addr ${a} $? 0 "ping out, loopback address bind"
2190 for a in ${NSA_IP6} ${NSA_LO_IP6} ${NSA_LINKIP6}%${NSB_DEV} ${MCAST}%${NSB_DEV}
2193 run_cmd_nsb ${ping6} -c1 -w1 ${a}
2194 log_test_addr ${a} $? 0 "ping in"
2200 for a in ${NSA_IP6} ${NSA_LO_IP6} ::1 ${NSA_LINKIP6}%${NSA_DEV} ${MCAST}%${NSA_DEV}
2203 run_cmd ${ping6} -c1 -w1 ${a}
2204 log_test_addr ${a} $? 0 "ping local, no bind"
2207 for a in ${NSA_IP6} ${NSA_LINKIP6}%${NSA_DEV} ${MCAST}%${NSA_DEV}
2210 run_cmd ${ping6} -c1 -w1 -I ${NSA_DEV} ${a}
2211 log_test_addr ${a} $? 0 "ping local, device bind"
2214 for a in ${NSA_LO_IP6} ::1
2218 run_cmd ${ping6} -c1 -w1 -I ${NSA_DEV} ${a}
2219 log_test_addr ${a} $? 2 "ping local, device bind"
2226 setup_cmd ip -6 rule add pref 32765 from all lookup local
2227 setup_cmd ip -6 rule del pref 0 from all lookup local
2228 setup_cmd ip -6 rule add pref 50 to ${NSB_LO_IP6} prohibit
2229 setup_cmd ip -6 rule add pref 51 from ${NSB_IP6} prohibit
2231 a=${NSB_LO_IP6}
2232 run_cmd ${ping6} -c1 -w1 ${a}
2233 log_test_addr ${a} $? 2 "ping out, blocked by rule"
2236 run_cmd ${ping6} -c1 -w1 -I ${NSA_DEV} ${a}
2237 log_test_addr ${a} $? 2 "ping out, device bind, blocked by rule"
2239 a=${NSA_LO_IP6}
2242 run_cmd_nsb ${ping6} -c1 -w1 ${a}
2243 log_test_addr ${a} $? 1 "ping in, blocked by rule"
2245 setup_cmd ip -6 rule add pref 0 from all lookup local
2246 setup_cmd ip -6 rule del pref 32765 from all lookup local
2247 setup_cmd ip -6 rule del pref 50 to ${NSB_LO_IP6} prohibit
2248 setup_cmd ip -6 rule del pref 51 from ${NSB_IP6} prohibit
2254 setup_cmd ip -6 route del ${NSB_LO_IP6}
2255 setup_cmd ip -6 route add unreachable ${NSB_LO_IP6} metric 10
2256 setup_cmd ip -6 route add unreachable ${NSB_IP6} metric 10
2258 a=${NSB_LO_IP6}
2259 run_cmd ${ping6} -c1 -w1 ${a}
2260 log_test_addr ${a} $? 2 "ping out, blocked by route"
2263 run_cmd ${ping6} -c1 -w1 -I ${NSA_DEV} ${a}
2264 log_test_addr ${a} $? 2 "ping out, device bind, blocked by route"
2266 a=${NSA_LO_IP6}
2269 run_cmd_nsb ${ping6} -c1 -w1 ${a}
2270 log_test_addr ${a} $? 1 "ping in, blocked by route"
2277 setup_cmd ip -6 ro del unreachable ${NSB_LO_IP6}
2278 setup_cmd ip -6 ro del unreachable ${NSB_IP6}
2280 a=${NSB_LO_IP6}
2281 run_cmd ${ping6} -c1 -w1 ${a}
2282 log_test_addr ${a} $? 2 "ping out, unreachable route"
2285 run_cmd ${ping6} -c1 -w1 -I ${NSA_DEV} ${a}
2286 log_test_addr ${a} $? 2 "ping out, device bind, unreachable route"
2291 local a
2299 for a in ${NSB_IP6} ${NSB_LO_IP6}
2302 run_cmd ${ping6} -c1 -w1 -I ${VRF} ${a}
2303 log_test_addr ${a} $? 0 "ping out, VRF bind"
2306 for a in ${NSB_LINKIP6}%${VRF} ${MCAST}%${VRF}
2310 run_cmd ${ping6} -c1 -w1 ${a}
2311 log_test_addr ${a} $? 1 "ping out, VRF bind"
2314 for a in ${NSB_IP6} ${NSB_LO_IP6} ${NSB_LINKIP6}%${NSA_DEV} ${MCAST}%${NSA_DEV}
2317 run_cmd ${ping6} -c1 -w1 -I ${NSA_DEV} ${a}
2318 log_test_addr ${a} $? 0 "ping out, device bind"
2321 for a in ${NSB_IP6} ${NSB_LO_IP6} ${NSB_LINKIP6}%${NSA_DEV}
2324 run_cmd ip vrf exec ${VRF} ${ping6} -c1 -w1 -I ${VRF_IP6} ${a}
2325 log_test_addr ${a} $? 0 "ping out, vrf device+address bind"
2331 for a in ${NSA_IP6} ${VRF_IP6} ${NSA_LINKIP6}%${NSB_DEV} ${MCAST}%${NSB_DEV}
2334 run_cmd_nsb ${ping6} -c1 -w1 ${a}
2335 log_test_addr ${a} $? 0 "ping in"
2338 a=${NSA_LO_IP6}
2341 run_cmd_nsb ${ping6} -c1 -w1 ${a}
2342 log_test_addr ${a} $? 1 "ping in"
2347 for a in ${NSA_IP6} ${VRF_IP6} ::1
2350 show_hint "Source address should be ${a}"
2351 run_cmd ${ping6} -c1 -w1 -I ${VRF} ${a}
2352 log_test_addr ${a} $? 0 "ping local, VRF bind"
2355 for a in ${NSA_IP6} ${NSA_LINKIP6}%${NSA_DEV} ${MCAST}%${NSA_DEV}
2358 run_cmd ${ping6} -c1 -w1 -I ${NSA_DEV} ${a}
2359 log_test_addr ${a} $? 0 "ping local, device bind"
2363 setup_cmd_nsb ip -6 addr del ${NSB_IP6}/64 dev ${NSB_DEV}
2364 setup_cmd_nsb ip -6 addr del ${NSB_LO_IP6}/128 dev lo
2365 setup_cmd_nsb ip -6 ro add ${NSA_IP6}/128 via ${NSA_LINKIP6} dev ${NSB_DEV}
2367 for a in ${NSA_IP6} ${VRF_IP6}
2371 log_test_addr ${a} $? 0 "ping in, LLA to GUA"
2374 setup_cmd_nsb ip -6 ro del ${NSA_IP6}/128 via ${NSA_LINKIP6} dev ${NSB_DEV}
2375 setup_cmd_nsb ip -6 addr add ${NSB_IP6}/64 dev ${NSB_DEV}
2376 setup_cmd_nsb ip -6 addr add ${NSB_LO_IP6}/128 dev lo
2382 setup_cmd ip -6 rule add pref 50 to ${NSB_LO_IP6} prohibit
2383 setup_cmd ip -6 rule add pref 51 from ${NSB_IP6} prohibit
2385 a=${NSB_LO_IP6}
2386 run_cmd ${ping6} -c1 -w1 ${a}
2387 log_test_addr ${a} $? 2 "ping out, blocked by rule"
2390 run_cmd ${ping6} -c1 -w1 -I ${NSA_DEV} ${a}
2391 log_test_addr ${a} $? 2 "ping out, device bind, blocked by rule"
2393 a=${NSA_LO_IP6}
2396 run_cmd_nsb ${ping6} -c1 -w1 ${a}
2397 log_test_addr ${a} $? 1 "ping in, blocked by rule"
2400 setup_cmd ip -6 rule del pref 50 to ${NSB_LO_IP6} prohibit
2401 setup_cmd ip -6 rule del pref 51 from ${NSB_IP6} prohibit
2407 setup_cmd ip -6 ro del ${NSB_LO_IP6} vrf ${VRF}
2409 a=${NSB_LO_IP6}
2410 run_cmd ${ping6} -c1 -w1 ${a}
2411 log_test_addr ${a} $? 2 "ping out, unreachable route"
2414 run_cmd ${ping6} -c1 -w1 -I ${NSA_DEV} ${a}
2415 log_test_addr ${a} $? 2 "ping out, device bind, unreachable route"
2417 ip -netns ${NSB} -6 ro del ${NSA_LO_IP6}
2418 a=${NSA_LO_IP6}
2420 run_cmd_nsb ${ping6} -c1 -w1 ${a}
2421 log_test_addr ${a} $? 2 "ping in, unreachable route"
2457 run_cmd nettest -6 -s -M ${MD5_PW} -m ${NSB_IP6} &
2459 run_cmd_nsb nettest -6 -r ${NSA_IP6} -X ${MD5_PW}
2465 run_cmd nettest -6 -s &
2467 run_cmd_nsb nettest -6 -r ${NSA_IP6} -X ${MD5_PW}
2473 run_cmd nettest -6 -s -M ${MD5_PW} -m ${NSB_IP6} &
2475 run_cmd_nsb nettest -6 -r ${NSA_IP6} -X ${MD5_WRONG_PW}
2481 run_cmd nettest -6 -s -M ${MD5_PW} -m ${NSB_LO_IP6} &
2483 run_cmd_nsb nettest -6 -r ${NSA_IP6} -X ${MD5_PW}
2492 run_cmd nettest -6 -s -M ${MD5_PW} -m ${NS_NET6} &
2494 run_cmd_nsb nettest -6 -r ${NSA_IP6} -X ${MD5_PW}
2500 run_cmd nettest -6 -s -M ${MD5_PW} -m ${NS_NET6} &
2502 run_cmd_nsb nettest -6 -r ${NSA_IP6} -X ${MD5_WRONG_PW}
2508 run_cmd nettest -6 -s -M ${MD5_PW} -m ${NS_NET6} &
2510 run_cmd_nsb nettest -6 -c ${NSB_LO_IP6} -r ${NSA_IP6} -X ${MD5_PW}
2525 run_cmd nettest -6 -s -I ${VRF} -M ${MD5_PW} -m ${NSB_IP6} &
2527 run_cmd_nsb nettest -6 -r ${NSA_IP6} -X ${MD5_PW}
2533 run_cmd nettest -6 -s -I ${VRF} &
2535 run_cmd_nsb nettest -6 -r ${NSA_IP6} -X ${MD5_PW}
2541 run_cmd nettest -6 -s -I ${VRF} -M ${MD5_PW} -m ${NSB_IP6} &
2543 run_cmd_nsb nettest -6 -r ${NSA_IP6} -X ${MD5_WRONG_PW}
2549 run_cmd nettest -6 -s -I ${VRF} -M ${MD5_PW} -m ${NSB_LO_IP6} &
2551 run_cmd_nsb nettest -6 -r ${NSA_IP6} -X ${MD5_PW}
2560 run_cmd nettest -6 -s -I ${VRF} -M ${MD5_PW} -m ${NS_NET6} &
2562 run_cmd_nsb nettest -6 -r ${NSA_IP6} -X ${MD5_PW}
2568 run_cmd nettest -6 -s -I ${VRF} -M ${MD5_PW} -m ${NS_NET6} &
2570 run_cmd_nsb nettest -6 -r ${NSA_IP6} -X ${MD5_WRONG_PW}
2576 run_cmd nettest -6 -s -I ${VRF} -M ${MD5_PW} -m ${NS_NET6} &
2578 run_cmd_nsb nettest -6 -c ${NSB_LO_IP6} -r ${NSA_IP6} -X ${MD5_PW}
2582 # duplicate config between default VRF and a VRF
2586 run_cmd nettest -6 -s -I ${VRF} -M ${MD5_PW} -m ${NSB_IP6} &
2587 run_cmd nettest -6 -s -M ${MD5_WRONG_PW} -m ${NSB_IP6} &
2589 run_cmd_nsb nettest -6 -r ${NSA_IP6} -X ${MD5_PW}
2593 run_cmd nettest -6 -s -I ${VRF} -M ${MD5_PW} -m ${NSB_IP6} &
2594 run_cmd nettest -6 -s -M ${MD5_WRONG_PW} -m ${NSB_IP6} &
2596 run_cmd_nsc nettest -6 -r ${NSA_IP6} -X ${MD5_WRONG_PW}
2601 run_cmd nettest -6 -s -I ${VRF} -M ${MD5_PW} -m ${NSB_IP6} &
2602 run_cmd nettest -6 -s -M ${MD5_WRONG_PW} -m ${NSB_IP6} &
2604 run_cmd_nsc nettest -6 -r ${NSA_IP6} -X ${MD5_PW}
2609 run_cmd nettest -6 -s -I ${VRF} -M ${MD5_PW} -m ${NSB_IP6} &
2610 run_cmd nettest -6 -s -M ${MD5_WRONG_PW} -m ${NSB_IP6} &
2612 run_cmd_nsb nettest -6 -r ${NSA_IP6} -X ${MD5_WRONG_PW}
2616 run_cmd nettest -6 -s -I ${VRF} -M ${MD5_PW} -m ${NS_NET6} &
2617 run_cmd nettest -6 -s -M ${MD5_WRONG_PW} -m ${NS_NET6} &
2619 run_cmd_nsb nettest -6 -r ${NSA_IP6} -X ${MD5_PW}
2623 run_cmd nettest -6 -s -I ${VRF} -M ${MD5_PW} -m ${NS_NET6} &
2624 run_cmd nettest -6 -s -M ${MD5_WRONG_PW} -m ${NS_NET6} &
2626 run_cmd_nsc nettest -6 -r ${NSA_IP6} -X ${MD5_WRONG_PW}
2631 run_cmd nettest -6 -s -I ${VRF} -M ${MD5_PW} -m ${NS_NET6} &
2632 run_cmd nettest -6 -s -M ${MD5_WRONG_PW} -m ${NS_NET6} &
2634 run_cmd_nsc nettest -6 -r ${NSA_IP6} -X ${MD5_PW}
2639 run_cmd nettest -6 -s -I ${VRF} -M ${MD5_PW} -m ${NS_NET6} &
2640 run_cmd nettest -6 -s -M ${MD5_WRONG_PW} -m ${NS_NET6} &
2642 run_cmd_nsb nettest -6 -r ${NSA_IP6} -X ${MD5_WRONG_PW}
2649 run_cmd nettest -6 -s -I ${NSA_DEV} -M ${MD5_PW} -m ${NSB_IP6}
2650 log_test $? 1 "MD5: VRF: Device must be a VRF - single address"
2653 run_cmd nettest -6 -s -I ${NSA_DEV} -M ${MD5_PW} -m ${NS_NET6}
2654 log_test $? 1 "MD5: VRF: Device must be a VRF - prefix"
2660 local a
2665 for a in ${NSA_IP6} ${NSA_LO_IP6} ${NSA_LINKIP6}%${NSB_DEV}
2668 run_cmd nettest -6 -s &
2670 run_cmd_nsb nettest -6 -r ${a}
2671 log_test_addr ${a} $? 0 "Global server"
2675 for a in ${NSA_IP6} ${NSA_LO_IP6} ${NSA_LINKIP6}%${NSB_DEV}
2679 run_cmd_nsb nettest -6 -r ${a}
2680 log_test_addr ${a} $? 1 "No server"
2686 for a in ${NSB_IP6} ${NSB_LO_IP6} ${NSB_LINKIP6}%${NSA_DEV}
2689 run_cmd_nsb nettest -6 -s &
2691 run_cmd nettest -6 -r ${a}
2692 log_test_addr ${a} $? 0 "Client"
2695 for a in ${NSB_IP6} ${NSB_LO_IP6} ${NSB_LINKIP6}%${NSA_DEV}
2698 run_cmd_nsb nettest -6 -s &
2700 run_cmd nettest -6 -r ${a} -d ${NSA_DEV}
2701 log_test_addr ${a} $? 0 "Client, device bind"
2704 for a in ${NSB_IP6} ${NSB_LO_IP6} ${NSB_LINKIP6}%${NSA_DEV}
2708 run_cmd nettest -6 -r ${a} -d ${NSA_DEV}
2709 log_test_addr ${a} $? 1 "No server, device client"
2715 for a in ${NSA_IP6} ${NSA_LO_IP6} ::1
2718 run_cmd nettest -6 -s &
2720 run_cmd nettest -6 -r ${a}
2721 log_test_addr ${a} $? 0 "Global server, local connection"
2724 a=${NSA_IP6}
2726 run_cmd nettest -6 -s -I ${NSA_DEV} -3 ${NSA_DEV} &
2728 run_cmd nettest -6 -r ${a} -0 ${a}
2729 log_test_addr ${a} $? 0 "Device server, unbound client, local connection"
2731 for a in ${NSA_LO_IP6} ::1
2735 run_cmd nettest -6 -s -I ${NSA_DEV} &
2737 run_cmd nettest -6 -r ${a}
2738 log_test_addr ${a} $? 1 "Device server, unbound client, local connection"
2741 a=${NSA_IP6}
2743 run_cmd nettest -6 -s &
2745 run_cmd nettest -6 -r ${a} -d ${NSA_DEV} -0 ${a}
2746 log_test_addr ${a} $? 0 "Global server, device client, local connection"
2748 for a in ${NSA_LO_IP6} ::1
2752 run_cmd nettest -6 -s &
2754 run_cmd nettest -6 -r ${a} -d ${NSA_DEV}
2755 log_test_addr ${a} $? 1 "Global server, device client, local connection"
2758 for a in ${NSA_IP6} ${NSA_LINKIP6}
2761 run_cmd nettest -6 -s -I ${NSA_DEV} -3 ${NSA_DEV} &
2763 run_cmd nettest -6 -d ${NSA_DEV} -r ${a}
2764 log_test_addr ${a} $? 0 "Device server, device client, local conn"
2767 for a in ${NSA_IP6} ${NSA_LINKIP6}
2771 run_cmd nettest -6 -d ${NSA_DEV} -r ${a}
2772 log_test_addr ${a} $? 1 "No server, device client, local conn"
2780 local a
2790 for a in ${NSA_IP6} ${VRF_IP6} ${NSA_LINKIP6}%${NSB_DEV}
2794 run_cmd nettest -6 -s &
2796 run_cmd_nsb nettest -6 -r ${a}
2797 log_test_addr ${a} $? 1 "Global server"
2800 for a in ${NSA_IP6} ${VRF_IP6}
2803 run_cmd nettest -6 -s -I ${VRF} -3 ${VRF} &
2805 run_cmd_nsb nettest -6 -r ${a}
2806 log_test_addr ${a} $? 0 "VRF server"
2810 a=${NSA_LINKIP6}%${NSB_DEV}
2812 run_cmd nettest -6 -s -I ${VRF} -3 ${NSA_DEV} &
2814 run_cmd_nsb nettest -6 -r ${a}
2815 log_test_addr ${a} $? 0 "VRF server"
2817 for a in ${NSA_IP6} ${VRF_IP6} ${NSA_LINKIP6}%${NSB_DEV}
2820 run_cmd nettest -6 -s -I ${NSA_DEV} -3 ${NSA_DEV} &
2822 run_cmd_nsb nettest -6 -r ${a}
2823 log_test_addr ${a} $? 0 "Device server"
2827 for a in ${NSA_IP6} ${VRF_IP6} ${NSA_LINKIP6}%${NSB_DEV}
2831 run_cmd_nsb nettest -6 -r ${a}
2832 log_test_addr ${a} $? 1 "No server"
2836 a=${NSA_IP6}
2839 run_cmd nettest -6 -s &
2841 run_cmd nettest -6 -r ${a} -d ${NSA_DEV}
2842 log_test_addr ${a} $? 1 "Global server, local connection"
2855 for a in ${NSA_IP6} ${VRF_IP6}
2858 run_cmd nettest -6 -s -3 ${VRF} &
2860 run_cmd_nsb nettest -6 -r ${a}
2861 log_test_addr ${a} $? 0 "Global server"
2864 for a in ${NSA_IP6} ${VRF_IP6}
2867 run_cmd nettest -6 -s -I ${VRF} -3 ${VRF} &
2869 run_cmd_nsb nettest -6 -r ${a}
2870 log_test_addr ${a} $? 0 "VRF server"
2874 a=${NSA_LINKIP6}%${NSB_DEV}
2876 run_cmd nettest -6 -s -3 ${NSA_DEV} &
2878 run_cmd_nsb nettest -6 -r ${a}
2879 log_test_addr ${a} $? 0 "Global server"
2882 run_cmd nettest -6 -s -I ${VRF} -3 ${NSA_DEV} &
2884 run_cmd_nsb nettest -6 -r ${a}
2885 log_test_addr ${a} $? 0 "VRF server"
2887 for a in ${NSA_IP6} ${NSA_LINKIP6}%${NSB_DEV}
2890 run_cmd nettest -6 -s -I ${NSA_DEV} -3 ${NSA_DEV} &
2892 run_cmd_nsb nettest -6 -r ${a}
2893 log_test_addr ${a} $? 0 "Device server"
2897 for a in ${NSA_IP6} ${VRF_IP6} ${NSA_LINKIP6}%${NSB_DEV}
2901 run_cmd_nsb nettest -6 -r ${a}
2902 log_test_addr ${a} $? 1 "No server"
2906 for a in ${NSA_IP6} ${VRF_IP6}
2910 run_cmd nettest -6 -s -I ${VRF} &
2912 run_cmd nettest -6 -r ${a}
2913 log_test_addr ${a} $? 1 "Global server, local connection"
2920 for a in ${NSB_IP6} ${NSB_LO_IP6}
2923 run_cmd_nsb nettest -6 -s &
2925 run_cmd nettest -6 -r ${a} -d ${VRF}
2926 log_test_addr ${a} $? 0 "Client, VRF bind"
2929 a=${NSB_LINKIP6}
2932 run_cmd_nsb nettest -6 -s &
2934 run_cmd nettest -6 -r ${a} -d ${VRF}
2935 log_test_addr ${a} $? 1 "Client, VRF bind"
2937 for a in ${NSB_IP6} ${NSB_LO_IP6} ${NSB_LINKIP6}
2940 run_cmd_nsb nettest -6 -s &
2942 run_cmd nettest -6 -r ${a} -d ${NSA_DEV}
2943 log_test_addr ${a} $? 0 "Client, device bind"
2946 for a in ${NSB_IP6} ${NSB_LO_IP6}
2950 run_cmd nettest -6 -r ${a} -d ${VRF}
2951 log_test_addr ${a} $? 1 "No server, VRF client"
2954 for a in ${NSB_IP6} ${NSB_LO_IP6} ${NSB_LINKIP6}
2958 run_cmd nettest -6 -r ${a} -d ${NSA_DEV}
2959 log_test_addr ${a} $? 1 "No server, device client"
2962 for a in ${NSA_IP6} ${VRF_IP6} ::1
2965 run_cmd nettest -6 -s -I ${VRF} -3 ${VRF} &
2967 run_cmd nettest -6 -r ${a} -d ${VRF} -0 ${a}
2968 log_test_addr ${a} $? 0 "VRF server, VRF client, local connection"
2971 a=${NSA_IP6}
2973 run_cmd nettest -6 -s -I ${VRF} -3 ${VRF} &
2975 run_cmd nettest -6 -r ${a} -d ${NSA_DEV} -0 ${a}
2976 log_test_addr ${a} $? 0 "VRF server, device client, local connection"
2978 a=${NSA_IP6}
2981 run_cmd nettest -6 -s -I ${VRF} &
2983 run_cmd nettest -6 -r ${a}
2984 log_test_addr ${a} $? 1 "VRF server, unbound client, local connection"
2987 run_cmd nettest -6 -s -I ${NSA_DEV} -3 ${NSA_DEV} &
2989 run_cmd nettest -6 -r ${a} -d ${VRF} -0 ${a}
2990 log_test_addr ${a} $? 0 "Device server, VRF client, local connection"
2992 for a in ${NSA_IP6} ${NSA_LINKIP6}
2995 run_cmd nettest -6 -s -I ${NSA_DEV} -3 ${NSA_DEV} &
2997 run_cmd nettest -6 -r ${a} -d ${NSA_DEV} -0 ${a}
2998 log_test_addr ${a} $? 0 "Device server, device client, local connection"
3027 local a
3032 for a in ${NSA_IP6} ${NSA_LINKIP6}%${NSB_DEV}
3035 run_cmd nettest -6 -D -s -3 ${NSA_DEV} &
3037 run_cmd_nsb nettest -6 -D -r ${a}
3038 log_test_addr ${a} $? 0 "Global server"
3041 run_cmd nettest -6 -D -I ${NSA_DEV} -s -3 ${NSA_DEV} &
3043 run_cmd_nsb nettest -6 -D -r ${a}
3044 log_test_addr ${a} $? 0 "Device server"
3047 a=${NSA_LO_IP6}
3049 run_cmd nettest -6 -D -s -3 ${NSA_DEV} &
3051 run_cmd_nsb nettest -6 -D -r ${a}
3052 log_test_addr ${a} $? 0 "Global server"
3054 # should fail since loopback address is out of scope for a device
3059 #run_cmd nettest -6 -D -I ${NSA_DEV} -s -3 ${NSA_DEV} &
3061 #run_cmd_nsb nettest -6 -D -r ${a}
3062 #log_test_addr ${a} $? 1 "Device server"
3065 for a in ${NSA_IP6} ${NSA_LO_IP6} ${NSA_LINKIP6}%${NSB_DEV}
3069 run_cmd_nsb nettest -6 -D -r ${a}
3070 log_test_addr ${a} $? 1 "No server"
3076 for a in ${NSB_IP6} ${NSB_LO_IP6} ${NSB_LINKIP6}%${NSA_DEV}
3079 run_cmd_nsb nettest -6 -D -s &
3081 run_cmd nettest -6 -D -r ${a} -0 ${NSA_IP6}
3082 log_test_addr ${a} $? 0 "Client"
3085 run_cmd_nsb nettest -6 -D -s &
3087 run_cmd nettest -6 -D -r ${a} -d ${NSA_DEV} -0 ${NSA_IP6}
3088 log_test_addr ${a} $? 0 "Client, device bind"
3091 run_cmd_nsb nettest -6 -D -s &
3093 run_cmd nettest -6 -D -r ${a} -d ${NSA_DEV} -C -0 ${NSA_IP6}
3094 log_test_addr ${a} $? 0 "Client, device send via cmsg"
3097 run_cmd_nsb nettest -6 -D -s &
3099 run_cmd nettest -6 -D -r ${a} -d ${NSA_DEV} -S -0 ${NSA_IP6}
3100 log_test_addr ${a} $? 0 "Client, device bind via IPV6_UNICAST_IF"
3104 run_cmd nettest -6 -D -r ${a}
3105 log_test_addr ${a} $? 1 "No server, unbound client"
3109 run_cmd nettest -6 -D -r ${a} -d ${NSA_DEV}
3110 log_test_addr ${a} $? 1 "No server, device client"
3116 for a in ${NSA_IP6} ${NSA_LO_IP6} ::1
3119 run_cmd nettest -6 -D -s &
3121 run_cmd nettest -6 -D -r ${a} -0 ${a} -1 ${a}
3122 log_test_addr ${a} $? 0 "Global server, local connection"
3125 a=${NSA_IP6}
3127 run_cmd nettest -6 -s -D -I ${NSA_DEV} -3 ${NSA_DEV} &
3129 run_cmd nettest -6 -D -r ${a}
3130 log_test_addr ${a} $? 0 "Device server, unbound client, local connection"
3132 for a in ${NSA_LO_IP6} ::1
3136 run_cmd nettest -6 -s -D -I ${NSA_DEV} &
3138 run_cmd nettest -6 -D -r ${a}
3139 log_test_addr ${a} $? 1 "Device server, local connection"
3142 a=${NSA_IP6}
3144 run_cmd nettest -6 -s -D &
3146 run_cmd nettest -6 -D -d ${NSA_DEV} -r ${a}
3147 log_test_addr ${a} $? 0 "Global server, device client, local connection"
3150 run_cmd nettest -6 -s -D &
3152 run_cmd nettest -6 -D -d ${NSA_DEV} -C -r ${a}
3153 log_test_addr ${a} $? 0 "Global server, device send via cmsg, local connection"
3156 run_cmd nettest -6 -s -D &
3158 run_cmd nettest -6 -D -d ${NSA_DEV} -S -r ${a}
3159 log_test_addr ${a} $? 0 "Global server, device client via IPV6_UNICAST_IF, local connection"
3161 for a in ${NSA_LO_IP6} ::1
3165 run_cmd nettest -6 -D -s &
3167 run_cmd nettest -6 -D -r ${a} -d ${NSA_DEV}
3168 log_test_addr ${a} $? 1 "Global server, device client, local connection"
3172 run_cmd nettest -6 -D -s &
3174 run_cmd nettest -6 -D -r ${a} -d ${NSA_DEV} -C
3175 log_test_addr ${a} $? 1 "Global server, device send via cmsg, local connection"
3179 run_cmd nettest -6 -D -s &
3181 run_cmd nettest -6 -D -r ${a} -d ${NSA_DEV} -S
3182 log_test_addr ${a} $? 1 "Global server, device client via IP_UNICAST_IF, local connection"
3186 run_cmd nettest -6 -D -s &
3188 run_cmd nettest -6 -D -r ${a} -d ${NSA_DEV} -S -U
3189 …log_test_addr ${a} $? 1 "Global server, device client via IP_UNICAST_IF, local connection, with co…
3192 a=${NSA_IP6}
3194 run_cmd nettest -6 -D -s -I ${NSA_DEV} -3 ${NSA_DEV} &
3196 run_cmd nettest -6 -D -d ${NSA_DEV} -r ${a} -0 ${a}
3197 log_test_addr ${a} $? 0 "Device server, device client, local conn"
3201 run_cmd nettest -6 -D -d ${NSA_DEV} -r ${a}
3202 log_test_addr ${a} $? 1 "No server, device client, local conn"
3205 run_cmd_nsb ip -6 addr del ${NSB_IP6}/64 dev ${NSB_DEV}
3206 run_cmd_nsb ip -6 ro add ${NSA_IP6}/128 dev ${NSB_DEV}
3208 run_cmd nettest -6 -s -D &
3210 run_cmd_nsb nettest -6 -D -r ${NSA_IP6}
3213 run_cmd_nsb ip -6 ro del ${NSA_IP6}/128 dev ${NSB_DEV}
3214 run_cmd_nsb ip -6 addr add ${NSB_IP6}/64 dev ${NSB_DEV} nodad
3219 local a
3228 for a in ${NSA_IP6} ${VRF_IP6}
3232 run_cmd nettest -6 -D -s &
3234 run_cmd_nsb nettest -6 -D -r ${a}
3235 log_test_addr ${a} $? 1 "Global server"
3238 for a in ${NSA_IP6} ${VRF_IP6}
3241 run_cmd nettest -6 -D -I ${VRF} -s -3 ${NSA_DEV} &
3243 run_cmd_nsb nettest -6 -D -r ${a}
3244 log_test_addr ${a} $? 0 "VRF server"
3247 for a in ${NSA_IP6} ${VRF_IP6}
3250 run_cmd nettest -6 -D -I ${NSA_DEV} -s -3 ${NSA_DEV} &
3252 run_cmd_nsb nettest -6 -D -r ${a}
3253 log_test_addr ${a} $? 0 "Enslaved device server"
3257 for a in ${NSA_IP6} ${VRF_IP6}
3261 run_cmd_nsb nettest -6 -D -r ${a}
3262 log_test_addr ${a} $? 1 "No server"
3268 for a in ${NSA_IP6} ${VRF_IP6}
3272 run_cmd nettest -6 -D -s &
3274 run_cmd nettest -6 -D -d ${VRF} -r ${a}
3275 log_test_addr ${a} $? 1 "Global server, VRF client, local conn"
3278 for a in ${NSA_IP6} ${VRF_IP6}
3281 run_cmd nettest -6 -D -I ${VRF} -s &
3283 run_cmd nettest -6 -D -d ${VRF} -r ${a}
3284 log_test_addr ${a} $? 0 "VRF server, VRF client, local conn"
3287 a=${NSA_IP6}
3290 run_cmd nettest -6 -D -s &
3292 run_cmd nettest -6 -D -d ${NSA_DEV} -r ${a}
3293 log_test_addr ${a} $? 1 "Global server, device client, local conn"
3296 run_cmd nettest -6 -D -I ${VRF} -s -3 ${NSA_DEV} &
3298 run_cmd nettest -6 -D -d ${NSA_DEV} -r ${a}
3299 log_test_addr ${a} $? 0 "VRF server, device client, local conn"
3302 run_cmd nettest -6 -D -I ${NSA_DEV} -s -3 ${NSA_DEV} &
3304 run_cmd nettest -6 -D -d ${VRF} -r ${a}
3305 log_test_addr ${a} $? 0 "Enslaved device server, VRF client, local conn"
3308 run_cmd nettest -6 -D -I ${NSA_DEV} -s -3 ${NSA_DEV} &
3310 run_cmd nettest -6 -D -d ${NSA_DEV} -r ${a}
3311 log_test_addr ${a} $? 0 "Enslaved device server, device client, local conn"
3320 for a in ${NSA_IP6} ${VRF_IP6}
3323 run_cmd nettest -6 -D -s -3 ${NSA_DEV} &
3325 run_cmd_nsb nettest -6 -D -r ${a}
3326 log_test_addr ${a} $? 0 "Global server"
3329 for a in ${NSA_IP6} ${VRF_IP6}
3332 run_cmd nettest -6 -D -I ${VRF} -s -3 ${NSA_DEV} &
3334 run_cmd_nsb nettest -6 -D -r ${a}
3335 log_test_addr ${a} $? 0 "VRF server"
3338 for a in ${NSA_IP6} ${VRF_IP6}
3341 run_cmd nettest -6 -D -I ${NSA_DEV} -s -3 ${NSA_DEV} &
3343 run_cmd_nsb nettest -6 -D -r ${a}
3344 log_test_addr ${a} $? 0 "Enslaved device server"
3348 for a in ${NSA_IP6} ${VRF_IP6}
3351 run_cmd_nsb nettest -6 -D -r ${a}
3352 log_test_addr ${a} $? 1 "No server"
3359 run_cmd_nsb nettest -6 -D -s &
3361 run_cmd nettest -6 -D -d ${VRF} -r ${NSB_IP6}
3366 run_cmd nettest -6 -D -d ${VRF} -r ${NSB_IP6}
3370 run_cmd_nsb nettest -6 -D -s &
3372 run_cmd nettest -6 -D -d ${NSA_DEV} -r ${NSB_IP6}
3377 run_cmd nettest -6 -D -d ${NSA_DEV} -r ${NSB_IP6}
3383 a=${NSA_IP6}
3385 run_cmd nettest -6 -D -s -3 ${NSA_DEV} &
3387 run_cmd nettest -6 -D -d ${VRF} -r ${a}
3388 log_test_addr ${a} $? 0 "Global server, VRF client, local conn"
3391 run_cmd nettest -6 -D -I ${VRF} -s -3 ${NSA_DEV} &
3393 run_cmd nettest -6 -D -d ${VRF} -r ${a}
3394 log_test_addr ${a} $? 0 "VRF server, VRF client, local conn"
3397 a=${VRF_IP6}
3399 run_cmd nettest -6 -D -s -3 ${VRF} &
3401 run_cmd nettest -6 -D -d ${VRF} -r ${a}
3402 log_test_addr ${a} $? 0 "Global server, VRF client, local conn"
3405 run_cmd nettest -6 -D -I ${VRF} -s -3 ${VRF} &
3407 run_cmd nettest -6 -D -d ${VRF} -r ${a}
3408 log_test_addr ${a} $? 0 "VRF server, VRF client, local conn"
3411 for a in ${NSA_IP6} ${VRF_IP6}
3414 run_cmd nettest -6 -D -d ${VRF} -r ${a}
3415 log_test_addr ${a} $? 1 "No server, VRF client, local conn"
3419 a=${NSA_IP6}
3421 run_cmd nettest -6 -D -s -3 ${NSA_DEV} &
3423 run_cmd nettest -6 -D -d ${NSA_DEV} -r ${a}
3424 log_test_addr ${a} $? 0 "Global server, device client, local conn"
3427 run_cmd nettest -6 -D -I ${VRF} -s -3 ${NSA_DEV} &
3429 run_cmd nettest -6 -D -d ${NSA_DEV} -r ${a}
3430 log_test_addr ${a} $? 0 "VRF server, device client, local conn"
3433 run_cmd nettest -6 -D -I ${NSA_DEV} -s -3 ${NSA_DEV} &
3435 run_cmd nettest -6 -D -d ${VRF} -r ${a}
3436 log_test_addr ${a} $? 0 "Device server, VRF client, local conn"
3439 run_cmd nettest -6 -D -I ${NSA_DEV} -s -3 ${NSA_DEV} &
3441 run_cmd nettest -6 -D -d ${NSA_DEV} -r ${a}
3442 log_test_addr ${a} $? 0 "Device server, device client, local conn"
3445 run_cmd nettest -6 -D -d ${NSA_DEV} -r ${a}
3446 log_test_addr ${a} $? 1 "No server, device client, local conn"
3451 run_cmd nettest -6 -D -s &
3453 run_cmd_nsb nettest -6 -D -d ${NSB_DEV} -r ${NSA_LINKIP6}
3457 run_cmd_nsb nettest -6 -D -d ${NSB_DEV} -r ${NSA_LINKIP6}
3462 run_cmd_nsb nettest -6 -D -s &
3464 run_cmd nettest -6 -D -d ${NSA_DEV} -r ${NSB_LINKIP6}
3468 run_cmd nettest -6 -D -d ${NSA_DEV} -r ${NSB_LINKIP6}
3473 run_cmd nettest -6 -D -s &
3475 run_cmd nettest -6 -D -d ${NSA_DEV} -r ${NSA_LINKIP6}
3479 run_cmd nettest -6 -D -d ${NSA_DEV} -r ${NSA_LINKIP6}
3483 run_cmd_nsb ip -6 addr del ${NSB_IP6}/64 dev ${NSB_DEV}
3484 run_cmd_nsb ip -6 ro add ${NSA_IP6}/128 dev ${NSB_DEV}
3486 run_cmd nettest -6 -s -D &
3488 run_cmd_nsb nettest -6 -D -r ${NSA_IP6}
3491 run_cmd_nsb ip -6 ro del ${NSA_IP6}/128 dev ${NSB_DEV}
3492 run_cmd_nsb ip -6 addr add ${NSB_IP6}/64 dev ${NSB_DEV} nodad
3526 for a in ${NSA_IP6} ${NSA_LO_IP6}
3529 run_cmd nettest -6 -s -R -P ipv6-icmp -l ${a} -b
3530 log_test_addr ${a} $? 0 "Raw socket bind to local address"
3533 run_cmd nettest -6 -s -R -P ipv6-icmp -l ${a} -I ${NSA_DEV} -b
3534 log_test_addr ${a} $? 0 "Raw socket bind to local address after device bind"
3540 a=${NL_IP6}
3542 run_cmd nettest -6 -s -R -P icmp -f -l ${a} -I ${NSA_DEV} -b
3543 log_test_addr ${a} $? 0 "Raw socket bind to nonlocal address"
3548 a=${NSA_IP6}
3550 run_cmd nettest -6 -s -l ${a} -t1 -b
3551 log_test_addr ${a} $? 0 "TCP socket bind to local address"
3554 run_cmd nettest -6 -s -l ${a} -I ${NSA_DEV} -t1 -b
3555 log_test_addr ${a} $? 0 "TCP socket bind to local address after device bind"
3557 # Sadly, the kernel allows binding a socket to a device and then
3560 a=${NSA_LO_IP6}
3563 run_cmd nettest -6 -s -l ${a} -I ${NSA_DEV} -t1 -b
3564 log_test_addr ${a} $? 0 "TCP socket bind to out of scope local address"
3572 for a in ${NSA_IP6} ${VRF_IP6}
3575 run_cmd nettest -6 -s -R -P ipv6-icmp -l ${a} -I ${VRF} -b
3576 log_test_addr ${a} $? 0 "Raw socket bind to local address after vrf bind"
3579 run_cmd nettest -6 -s -R -P ipv6-icmp -l ${a} -I ${NSA_DEV} -b
3580 log_test_addr ${a} $? 0 "Raw socket bind to local address after device bind"
3583 a=${NSA_LO_IP6}
3586 run_cmd nettest -6 -s -R -P ipv6-icmp -l ${a} -I ${VRF} -b
3587 log_test_addr ${a} $? 1 "Raw socket bind to invalid local address after vrf bind"
3592 a=${NL_IP6}
3594 run_cmd nettest -6 -s -R -P icmp -f -l ${a} -I ${VRF} -b
3595 log_test_addr ${a} $? 0 "Raw socket bind to nonlocal address after VRF bind"
3600 # address on enslaved device is valid for the VRF or device in a VRF
3601 for a in ${NSA_IP6} ${VRF_IP6}
3604 run_cmd nettest -6 -s -l ${a} -I ${VRF} -t1 -b
3605 log_test_addr ${a} $? 0 "TCP socket bind to local address with VRF bind"
3608 a=${NSA_IP6}
3610 run_cmd nettest -6 -s -l ${a} -I ${NSA_DEV} -t1 -b
3611 log_test_addr ${a} $? 0 "TCP socket bind to local address with device bind"
3613 # Sadly, the kernel allows binding a socket to a device and then
3617 a=${VRF_IP6}
3620 run_cmd nettest -6 -s -l ${a} -I ${NSA_DEV} -t1 -b
3621 log_test_addr ${a} $? 0 "TCP socket bind to VRF address with device bind"
3623 a=${NSA_LO_IP6}
3626 run_cmd nettest -6 -s -l ${a} -I ${VRF} -t1 -b
3627 log_test_addr ${a} $? 1 "TCP socket bind to invalid local address for VRF"
3631 run_cmd nettest -6 -s -l ${a} -I ${NSA_DEV} -t1 -b
3632 log_test_addr ${a} $? 1 "TCP socket bind to invalid local address for device bind"
3655 local varg="-6 $2"
3657 local a
3662 for a in ${NSA_IP6} ${VRF_IP6}
3667 run_cmd_nsb nettest ${varg} -r ${a} &
3671 log_test_addr ${a} 0 0 "${desc}, global server"
3676 for a in ${NSA_IP6} ${VRF_IP6}
3681 run_cmd_nsb nettest ${varg} -r ${a} &
3685 log_test_addr ${a} 0 0 "${desc}, VRF server"
3690 for a in ${NSA_IP6} ${VRF_IP6}
3695 run_cmd_nsb nettest ${varg} -r ${a} &
3699 log_test_addr ${a} 0 0 "${desc}, enslaved device server"
3733 for a in ${NSA_IP6} ${VRF_IP6}
3738 run_cmd nettest ${varg} -d ${VRF} -r ${a} &
3742 log_test_addr ${a} 0 0 "${desc}, global server, VRF client"
3747 for a in ${NSA_IP6} ${VRF_IP6}
3752 run_cmd nettest ${varg} -d ${VRF} -r ${a} &
3756 log_test_addr ${a} 0 0 "${desc}, VRF server and client"
3761 a=${NSA_IP6}
3765 run_cmd nettest ${varg} -d ${NSA_DEV} -r ${a} &
3769 log_test_addr ${a} 0 0 "${desc}, global server, device client"
3776 run_cmd nettest ${varg} -d ${NSA_DEV} -r ${a} &
3780 log_test_addr ${a} 0 0 "${desc}, VRF server, device client"
3787 run_cmd nettest ${varg} -d ${NSA_DEV} -r ${a} &
3791 log_test_addr ${a} 0 0 "${desc}, device server, device client"
3797 local a
3799 a=${NSA_IP6}
3801 run_cmd_nsb ${ping6} -f ${a} &
3805 log_test_addr ${a} 0 0 "Device delete with active traffic - ping in"
3814 log_test_addr ${a} 0 0 "Device delete with active traffic - ping out"
3839 local a
3841 for a in ${NSA_IP} ${VRF_IP}
3846 run_cmd_nsb nettest -r ${a}
3847 log_test_addr ${a} $? 1 "Global server, reject with TCP-reset on Rx"
3855 local a
3859 for a in ${NSA_IP} ${VRF_IP}
3864 run_cmd_nsb nettest ${arg} -r ${a}
3865 log_test_addr ${a} $? 1 "Global ${stype} server, Rx reject icmp-port-unreach"
3875 run_cmd iptables -A INPUT -p tcp --dport 12345 -j REJECT --reject-with tcp-reset
3884 run_cmd iptables -A INPUT -p tcp --dport 12345 -j REJECT --reject-with icmp-port-unreachable
3885 run_cmd iptables -A INPUT -p udp --dport 12345 -j REJECT --reject-with icmp-port-unreachable
3896 local a
3898 for a in ${NSA_IP6} ${VRF_IP6}
3901 run_cmd nettest -6 -s &
3903 run_cmd_nsb nettest -6 -r ${a}
3904 log_test_addr ${a} $? 1 "Global server, reject with TCP-reset on Rx"
3912 local a
3916 for a in ${NSA_IP6} ${VRF_IP6}
3919 run_cmd nettest -6 -s ${arg} &
3921 run_cmd_nsb nettest -6 ${arg} -r ${a}
3922 log_test_addr ${a} $? 1 "Global ${stype} server, Rx reject icmp-port-unreach"
3932 run_cmd ip6tables -A INPUT -p tcp --dport 12345 -j REJECT --reject-with tcp-reset
3940 run_cmd ip6tables -A INPUT -p tcp --dport 12345 -j REJECT --reject-with icmp6-port-unreachable
3941 run_cmd ip6tables -A INPUT -p udp --dport 12345 -j REJECT --reject-with icmp6-port-unreachable
3954 # ns-A device enslaved to bridge. Verify traffic with and without
3962 setup_cmd ip -6 addr del dev ${NSA_DEV} ${NSA_IP6}/64
3966 setup_cmd ip -6 addr add dev br0 ${NSA_IP6}/64 nodad
4015 setup_cmd ip -6 addr add dev br0.100 2001:db8:101::1/64 nodad
4019 setup_cmd_nsb ip -6 addr add dev vlan100 2001:db8:101::2/64 nodad
4065 # ns-A device is connected to both ns-B and ns-C on a single VRF but only has
4070 # only want reply from ns-A
4081 # cycle/flap the first ns-A interface
4092 # cycle/flap the second ns-A interface
4104 # Perform IPv{4,6} SNAT on ns-A, and verify TCP connection is successfully
4112 …run_cmd iptables -t nat -A POSTROUTING -p tcp -m tcp --dport ${port} -j SNAT --to-source ${NSA_LO_…
4113 …run_cmd ip6tables -t nat -A POSTROUTING -p tcp -m tcp --dport ${port} -j SNAT --to-source ${NSA_LO…
4120 run_cmd_nsb nettest -6 -s -l ${NSB_IP6} -p ${port} &
4122 run_cmd nettest -6 -d ${VRF} -r ${NSB_IP6} -p ${port}
4150 -6 IPv6 tests only
4175 6) TESTS=ipv6;;