Lines Matching full:a
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
74 NSA=ns-A
104 read a
105 [ "$a" = "q" ] && exit 1
112 read a
113 [ "$a" = "q" ] && exit 1
193 if [ "$VERBOSE" = "1" -a -n "$out" ]; then
231 read a
253 read a
275 read a
281 # set sysctl values in NS-A
298 ${NSA_IP}) echo "ns-A IP";;
299 ${NSA_IP6}) echo "ns-A IPv6";;
300 ${NSA_LO_IP}) echo "ns-A loopback IP";;
301 ${NSA_LO_IP6}) echo "ns-A loopback IPv6";;
302 ${NSA_LINKIP6}|${NSA_LINKIP6}%*) echo "ns-A IPv6 LLA";;
450 # make sure we are starting with a clean slate
465 # tell ns-A how to get to remote addresses of ns-B
477 # ns-B but for a device NOT in the VRF
487 # tell ns-B how to get to remote addresses of ns-A
498 # make sure we are starting with a clean slate
531 local a
536 for a in ${NSB_IP} ${NSB_LO_IP}
539 run_cmd ping -c1 -w1 ${a}
540 log_test_addr ${a} $? 0 "ping out"
543 run_cmd ping -c1 -w1 -I ${NSA_DEV} ${a}
544 log_test_addr ${a} $? 0 "ping out, device bind"
547 run_cmd ping -c1 -w1 -I ${NSA_LO_IP} ${a}
548 log_test_addr ${a} $? 0 "ping out, address bind"
554 for a in ${NSA_IP} ${NSA_LO_IP}
557 run_cmd_nsb ping -c1 -w1 ${a}
558 log_test_addr ${a} $? 0 "ping in"
564 for a in ${NSA_IP} ${NSA_LO_IP} 127.0.0.1
567 run_cmd ping -c1 -w1 ${a}
568 log_test_addr ${a} $? 0 "ping local"
575 a=${NSA_IP}
577 run_cmd ping -c1 -w1 -I ${NSA_DEV} ${a}
578 log_test_addr ${a} $? 0 "ping local, device bind"
581 # fails in a really weird way though because ipv4 special cases
583 for a in ${NSA_LO_IP} 127.0.0.1
587 run_cmd ping -c1 -w1 -I ${NSA_DEV} ${a}
588 log_test_addr ${a} $? 1 "ping local, device bind"
600 a=${NSB_LO_IP}
601 run_cmd ping -c1 -w1 ${a}
602 log_test_addr ${a} $? 2 "ping out, blocked by rule"
605 # a viable rtable if the oif (e.g., bind to device) is set, so this
607 # run_cmd ping -c1 -w1 -I ${NSA_DEV} ${a}
609 a=${NSA_LO_IP}
612 run_cmd_nsb ping -c1 -w1 ${a}
613 log_test_addr ${a} $? 1 "ping in, blocked by rule"
628 a=${NSB_LO_IP}
629 run_cmd ping -c1 -w1 ${a}
630 log_test_addr ${a} $? 2 "ping out, blocked by route"
633 # a viable rtable if the oif (e.g., bind to device) is set, so this
634 # case succeeds despite not having a route for the address
635 # run_cmd ping -c1 -w1 -I ${NSA_DEV} ${a}
637 a=${NSA_LO_IP}
640 run_cmd_nsb ping -c1 -w1 ${a}
641 log_test_addr ${a} $? 1 "ping in, blocked by route"
649 a=${NSB_LO_IP}
650 run_cmd ping -c1 -w1 ${a}
651 log_test_addr ${a} $? 2 "ping out, unreachable default route"
654 # a viable rtable if the oif (e.g., bind to device) is set, so this
655 # case succeeds despite not having a route for the address
656 # run_cmd ping -c1 -w1 -I ${NSA_DEV} ${a}
661 local a
669 for a in ${NSB_IP} ${NSB_LO_IP}
672 run_cmd ping -c1 -w1 -I ${VRF} ${a}
673 log_test_addr ${a} $? 0 "ping out, VRF bind"
676 run_cmd ping -c1 -w1 -I ${NSA_DEV} ${a}
677 log_test_addr ${a} $? 0 "ping out, device bind"
680 run_cmd ip vrf exec ${VRF} ping -c1 -w1 -I ${NSA_IP} ${a}
681 log_test_addr ${a} $? 0 "ping out, vrf device + dev address bind"
684 run_cmd ip vrf exec ${VRF} ping -c1 -w1 -I ${VRF_IP} ${a}
685 log_test_addr ${a} $? 0 "ping out, vrf device + vrf address bind"
691 for a in ${NSA_IP} ${VRF_IP}
694 run_cmd_nsb ping -c1 -w1 ${a}
695 log_test_addr ${a} $? 0 "ping in"
701 for a in ${NSA_IP} ${VRF_IP} 127.0.0.1
704 show_hint "Source address should be ${a}"
705 run_cmd ping -c1 -w1 -I ${VRF} ${a}
706 log_test_addr ${a} $? 0 "ping local, VRF bind"
713 a=${NSA_IP}
715 run_cmd ping -c1 -w1 -I ${NSA_DEV} ${a}
716 log_test_addr ${a} $? 0 "ping local, device bind"
719 for a in ${VRF_IP} 127.0.0.1
723 run_cmd ping -c1 -w1 -I ${NSA_DEV} ${a}
724 log_test_addr ${a} $? 1 "ping local, device bind"
734 a=${NSB_LO_IP}
735 run_cmd ping -c1 -w1 -I ${VRF} ${a}
736 log_test_addr ${a} $? 2 "ping out, vrf bind, blocked by rule"
739 run_cmd ping -c1 -w1 -I ${NSA_DEV} ${a}
740 log_test_addr ${a} $? 2 "ping out, device bind, blocked by rule"
742 a=${NSA_LO_IP}
745 run_cmd_nsb ping -c1 -w1 ${a}
746 log_test_addr ${a} $? 1 "ping in, blocked by rule"
758 a=${NSB_LO_IP}
759 run_cmd ping -c1 -w1 -I ${VRF} ${a}
760 log_test_addr ${a} $? 2 "ping out, vrf bind, unreachable route"
763 run_cmd ping -c1 -w1 -I ${NSA_DEV} ${a}
764 log_test_addr ${a} $? 2 "ping out, device bind, unreachable route"
766 a=${NSA_LO_IP}
769 run_cmd_nsb ping -c1 -w1 ${a}
770 log_test_addr ${a} $? 1 "ping in, unreachable route"
929 # duplicate config between default VRF and a VRF
997 log_test $? 1 "MD5: VRF: Device must be a VRF - single address"
1001 log_test $? 1 "MD5: VRF: Device must be a VRF - prefix"
1007 local a
1012 for a in ${NSA_IP} ${NSA_LO_IP}
1017 run_cmd_nsb nettest -r ${a}
1018 log_test_addr ${a} $? 0 "Global server"
1021 a=${NSA_IP}
1025 run_cmd_nsb nettest -r ${a}
1026 log_test_addr ${a} $? 0 "Device server"
1029 for a in ${NSA_IP} ${NSA_LO_IP}
1033 run_cmd_nsb nettest -r ${a}
1034 log_test_addr ${a} $? 1 "No server"
1040 for a in ${NSB_IP} ${NSB_LO_IP}
1045 run_cmd nettest -r ${a} -0 ${NSA_IP}
1046 log_test_addr ${a} $? 0 "Client"
1051 run_cmd nettest -r ${a} -d ${NSA_DEV}
1052 log_test_addr ${a} $? 0 "Client, device bind"
1056 run_cmd nettest -r ${a}
1057 log_test_addr ${a} $? 1 "No server, unbound client"
1061 run_cmd nettest -r ${a} -d ${NSA_DEV}
1062 log_test_addr ${a} $? 1 "No server, device client"
1068 for a in ${NSA_IP} ${NSA_LO_IP} 127.0.0.1
1073 run_cmd nettest -r ${a} -0 ${a} -1 ${a}
1074 log_test_addr ${a} $? 0 "Global server, local connection"
1077 a=${NSA_IP}
1081 run_cmd nettest -r ${a} -0 ${a}
1082 log_test_addr ${a} $? 0 "Device server, unbound client, local connection"
1084 for a in ${NSA_LO_IP} 127.0.0.1
1090 run_cmd nettest -r ${a}
1091 log_test_addr ${a} $? 1 "Device server, unbound client, local connection"
1094 a=${NSA_IP}
1098 run_cmd nettest -r ${a} -0 ${a} -d ${NSA_DEV}
1099 log_test_addr ${a} $? 0 "Global server, device client, local connection"
1101 for a in ${NSA_LO_IP} 127.0.0.1
1107 run_cmd nettest -r ${a} -d ${NSA_DEV}
1108 log_test_addr ${a} $? 1 "Global server, device client, local connection"
1111 a=${NSA_IP}
1115 run_cmd nettest -d ${NSA_DEV} -r ${a} -0 ${a}
1116 log_test_addr ${a} $? 0 "Device server, device client, local connection"
1120 run_cmd nettest -d ${NSA_DEV} -r ${a}
1121 log_test_addr ${a} $? 1 "No server, device client, local conn"
1128 local a
1138 for a in ${NSA_IP} ${VRF_IP}
1144 run_cmd_nsb nettest -r ${a}
1145 log_test_addr ${a} $? 1 "Global server"
1150 run_cmd_nsb nettest -r ${a}
1151 log_test_addr ${a} $? 0 "VRF server"
1156 run_cmd_nsb nettest -r ${a}
1157 log_test_addr ${a} $? 0 "Device server"
1162 run_cmd_nsb nettest -r ${a}
1163 log_test_addr ${a} $? 1 "No server"
1168 a=${NSA_IP}
1173 run_cmd nettest -r ${a} -d ${NSA_DEV}
1174 log_test_addr ${a} $? 1 "Global server, local connection"
1185 for a in ${NSA_IP} ${VRF_IP}
1191 run_cmd_nsb nettest -r ${a}
1192 log_test_addr ${a} $? 0 "Global server"
1198 run_cmd_nsb nettest -r ${a}
1199 log_test_addr ${a} $? 0 "VRF server"
1204 run_cmd_nsb nettest -r ${a}
1205 log_test_addr ${a} $? 1 "No server"
1208 a=${NSA_IP}
1213 run_cmd_nsb nettest -r ${a}
1214 log_test_addr ${a} $? 0 "Device server"
1217 for a in ${NSA_IP} ${VRF_IP}
1223 run_cmd nettest -r ${a}
1224 log_test_addr ${a} $? 1 "Global server, local connection"
1230 for a in ${NSB_IP} ${NSB_LO_IP}
1235 run_cmd nettest -r ${a} -d ${VRF}
1236 log_test_addr ${a} $? 0 "Client, VRF bind"
1241 run_cmd nettest -r ${a} -d ${NSA_DEV}
1242 log_test_addr ${a} $? 0 "Client, device bind"
1246 run_cmd nettest -r ${a} -d ${VRF}
1247 log_test_addr ${a} $? 1 "No server, VRF client"
1251 run_cmd nettest -r ${a} -d ${NSA_DEV}
1252 log_test_addr ${a} $? 1 "No server, device client"
1255 for a in ${NSA_IP} ${VRF_IP} 127.0.0.1
1260 run_cmd nettest -r ${a} -d ${VRF} -0 ${a}
1261 log_test_addr ${a} $? 0 "VRF server, VRF client, local connection"
1264 a=${NSA_IP}
1268 run_cmd nettest -r ${a} -d ${NSA_DEV} -0 ${a}
1269 log_test_addr ${a} $? 0 "VRF server, device client, local connection"
1275 run_cmd nettest -r ${a}
1276 log_test_addr ${a} $? 1 "VRF server, unbound client, local connection"
1281 run_cmd nettest -r ${a} -d ${VRF} -0 ${a}
1282 log_test_addr ${a} $? 0 "Device server, VRF client, local connection"
1287 run_cmd nettest -r ${a} -d ${NSA_DEV} -0 ${a}
1288 log_test_addr ${a} $? 0 "Device server, device client, local connection"
1316 local a
1321 for a in ${NSA_IP} ${NSA_LO_IP}
1326 run_cmd_nsb nettest -D -r ${a}
1327 log_test_addr ${a} $? 0 "Global server"
1331 run_cmd_nsb nettest -D -r ${a}
1332 log_test_addr ${a} $? 1 "No server"
1335 a=${NSA_IP}
1339 run_cmd_nsb nettest -D -r ${a}
1340 log_test_addr ${a} $? 0 "Device server"
1345 for a in ${NSB_IP} ${NSB_LO_IP}
1350 run_cmd nettest -D -r ${a} -0 ${NSA_IP}
1351 log_test_addr ${a} $? 0 "Client"
1356 run_cmd nettest -D -r ${a} -d ${NSA_DEV} -0 ${NSA_IP}
1357 log_test_addr ${a} $? 0 "Client, device bind"
1362 run_cmd nettest -D -r ${a} -d ${NSA_DEV} -C -0 ${NSA_IP}
1363 log_test_addr ${a} $? 0 "Client, device send via cmsg"
1368 run_cmd nettest -D -r ${a} -d ${NSA_DEV} -S -0 ${NSA_IP}
1369 log_test_addr ${a} $? 0 "Client, device bind via IP_UNICAST_IF"
1373 run_cmd nettest -D -r ${a}
1374 log_test_addr ${a} $? 1 "No server, unbound client"
1378 run_cmd nettest -D -r ${a} -d ${NSA_DEV}
1379 log_test_addr ${a} $? 1 "No server, device client"
1385 for a in ${NSA_IP} ${NSA_LO_IP} 127.0.0.1
1390 run_cmd nettest -D -r ${a} -0 ${a} -1 ${a}
1391 log_test_addr ${a} $? 0 "Global server, local connection"
1394 a=${NSA_IP}
1398 run_cmd nettest -D -r ${a}
1399 log_test_addr ${a} $? 0 "Device server, unbound client, local connection"
1401 for a in ${NSA_LO_IP} 127.0.0.1
1407 run_cmd nettest -D -r ${a}
1408 log_test_addr ${a} $? 1 "Device server, unbound client, local connection"
1411 a=${NSA_IP}
1415 run_cmd nettest -D -d ${NSA_DEV} -r ${a}
1416 log_test_addr ${a} $? 0 "Global server, device client, local connection"
1421 run_cmd nettest -D -d ${NSA_DEV} -C -r ${a}
1422 log_test_addr ${a} $? 0 "Global server, device send via cmsg, local connection"
1427 run_cmd nettest -D -d ${NSA_DEV} -S -r ${a}
1428 log_test_addr ${a} $? 0 "Global server, device client via IP_UNICAST_IF, local connection"
1433 for a in ${NSA_LO_IP} 127.0.0.1
1439 run_cmd nettest -D -r ${a} -d ${NSA_DEV}
1440 log_test_addr ${a} $? 2 "Global server, device client, local connection"
1446 run_cmd nettest -D -r ${a} -d ${NSA_DEV} -C
1447 log_test_addr ${a} $? 1 "Global server, device send via cmsg, local connection"
1453 run_cmd nettest -D -r ${a} -d ${NSA_DEV} -S
1454 log_test_addr ${a} $? 1 "Global server, device client via IP_UNICAST_IF, local connection"
1457 a=${NSA_IP}
1461 run_cmd nettest -D -d ${NSA_DEV} -r ${a} -0 ${a}
1462 log_test_addr ${a} $? 0 "Device server, device client, local conn"
1465 run_cmd nettest -D -d ${NSA_DEV} -r ${a}
1466 log_test_addr ${a} $? 2 "No server, device client, local conn"
1471 local a
1480 for a in ${NSA_IP} ${VRF_IP}
1483 show_hint "Fails because ingress is in a VRF and global server is disabled"
1486 run_cmd_nsb nettest -D -r ${a}
1487 log_test_addr ${a} $? 1 "Global server"
1492 run_cmd_nsb nettest -D -r ${a}
1493 log_test_addr ${a} $? 0 "VRF server"
1498 run_cmd_nsb nettest -D -r ${a}
1499 log_test_addr ${a} $? 0 "Enslaved device server"
1503 run_cmd_nsb nettest -D -r ${a}
1504 log_test_addr ${a} $? 1 "No server"
1510 run_cmd nettest -D -d ${VRF} -r ${a}
1511 log_test_addr ${a} $? 1 "Global server, VRF client, local connection"
1514 a=${NSA_IP}
1518 run_cmd nettest -D -d ${VRF} -r ${a}
1519 log_test_addr ${a} $? 0 "VRF server, VRF client, local conn"
1524 run_cmd nettest -D -d ${NSA_DEV} -r ${a}
1525 log_test_addr ${a} $? 0 "VRF server, enslaved device client, local connection"
1527 a=${NSA_IP}
1531 run_cmd nettest -D -d ${VRF} -r ${a}
1532 log_test_addr ${a} $? 0 "Enslaved device server, VRF client, local conn"
1537 run_cmd nettest -D -d ${NSA_DEV} -r ${a}
1538 log_test_addr ${a} $? 0 "Enslaved device server, device client, local conn"
1547 for a in ${NSA_IP} ${VRF_IP}
1552 run_cmd_nsb nettest -D -r ${a}
1553 log_test_addr ${a} $? 0 "Global server"
1558 run_cmd_nsb nettest -D -r ${a}
1559 log_test_addr ${a} $? 0 "VRF server"
1564 run_cmd_nsb nettest -D -r ${a}
1565 log_test_addr ${a} $? 0 "Enslaved device server"
1569 run_cmd_nsb nettest -D -r ${a}
1570 log_test_addr ${a} $? 1 "No server"
1602 a=${NSA_IP}
1606 run_cmd nettest -D -d ${VRF} -r ${a}
1607 log_test_addr ${a} $? 0 "Global server, VRF client, local conn"
1612 run_cmd nettest -D -d ${VRF} -r ${a}
1613 log_test_addr ${a} $? 0 "VRF server, VRF client, local conn"
1618 run_cmd nettest -D -d ${NSA_DEV} -r ${a}
1619 log_test_addr ${a} $? 0 "VRF server, device client, local conn"
1624 run_cmd nettest -D -d ${VRF} -r ${a}
1625 log_test_addr ${a} $? 0 "Enslaved device server, VRF client, local conn"
1630 run_cmd nettest -D -d ${NSA_DEV} -r ${a}
1631 log_test_addr ${a} $? 0 "Enslaved device server, device client, local conn"
1633 for a in ${VRF_IP} 127.0.0.1
1638 run_cmd nettest -D -d ${VRF} -r ${a}
1639 log_test_addr ${a} $? 0 "Global server, VRF client, local conn"
1642 for a in ${VRF_IP} 127.0.0.1
1647 run_cmd nettest -D -d ${VRF} -r ${a}
1648 log_test_addr ${a} $? 0 "VRF server, VRF client, local conn"
1653 for a in ${NSA_IP} ${VRF_IP} 127.0.0.1
1657 run_cmd nettest -D -d ${VRF} -r ${a}
1658 log_test_addr ${a} $? 1 "No server, VRF client, local conn"
1693 for a in ${NSA_IP} ${NSA_LO_IP}
1696 run_cmd nettest -s -R -P icmp -l ${a} -b
1697 log_test_addr ${a} $? 0 "Raw socket bind to local address"
1700 run_cmd nettest -s -R -P icmp -l ${a} -d ${NSA_DEV} -b
1701 log_test_addr ${a} $? 0 "Raw socket bind to local address after device bind"
1707 a=${NSA_IP}
1709 run_cmd nettest -l ${a} -r ${NSB_IP} -t1 -b
1710 log_test_addr ${a} $? 0 "TCP socket bind to local address"
1713 run_cmd nettest -l ${a} -r ${NSB_IP} -d ${NSA_DEV} -t1 -b
1714 log_test_addr ${a} $? 0 "TCP socket bind to local address after device bind"
1716 # Sadly, the kernel allows binding a socket to a device and then
1720 #a=${NSA_LO_IP}
1723 #run_cmd nettest -s -l ${a} -d ${NSA_DEV} -t1 -b
1724 #log_test_addr ${a} $? 1 "TCP socket bind to out of scope local address"
1732 for a in ${NSA_IP} ${VRF_IP}
1735 run_cmd nettest -s -R -P icmp -l ${a} -b
1736 log_test_addr ${a} $? 0 "Raw socket bind to local address"
1739 run_cmd nettest -s -R -P icmp -l ${a} -d ${NSA_DEV} -b
1740 log_test_addr ${a} $? 0 "Raw socket bind to local address after device bind"
1742 run_cmd nettest -s -R -P icmp -l ${a} -d ${VRF} -b
1743 log_test_addr ${a} $? 0 "Raw socket bind to local address after VRF bind"
1746 a=${NSA_LO_IP}
1749 run_cmd nettest -s -R -P icmp -l ${a} -d ${VRF} -b
1750 log_test_addr ${a} $? 1 "Raw socket bind to out of scope address after VRF bind"
1755 for a in ${NSA_IP} ${VRF_IP}
1758 run_cmd nettest -s -l ${a} -d ${VRF} -t1 -b
1759 log_test_addr ${a} $? 0 "TCP socket bind to local address"
1762 run_cmd nettest -s -l ${a} -d ${NSA_DEV} -t1 -b
1763 log_test_addr ${a} $? 0 "TCP socket bind to local address after device bind"
1766 a=${NSA_LO_IP}
1769 run_cmd nettest -s -l ${a} -d ${VRF} -t1 -b
1770 log_test_addr ${a} $? 1 "TCP socket bind to invalid local address for VRF"
1774 run_cmd nettest -s -l ${a} -d ${NSA_DEV} -t1 -b
1775 log_test_addr ${a} $? 1 "TCP socket bind to invalid local address for device bind"
1799 local a
1804 for a in ${NSA_IP} ${VRF_IP}
1809 run_cmd_nsb nettest ${varg} -r ${a} &
1813 log_test_addr ${a} 0 0 "${desc}, global server"
1818 for a in ${NSA_IP} ${VRF_IP}
1823 run_cmd_nsb nettest ${varg} -r ${a} &
1827 log_test_addr ${a} 0 0 "${desc}, VRF server"
1832 a=${NSA_IP}
1836 run_cmd_nsb nettest ${varg} -r ${a} &
1840 log_test_addr ${a} 0 0 "${desc}, enslaved device server"
1854 log_test_addr ${a} 0 0 "${desc}, VRF client"
1865 log_test_addr ${a} 0 0 "${desc}, enslaved device client"
1872 for a in ${NSA_IP} ${VRF_IP}
1877 run_cmd nettest ${varg} -d ${VRF} -r ${a} &
1881 log_test_addr ${a} 0 0 "${desc}, global server, VRF client, local"
1886 for a in ${NSA_IP} ${VRF_IP}
1891 run_cmd nettest ${varg} -d ${VRF} -r ${a} &
1895 log_test_addr ${a} 0 0 "${desc}, VRF server and client, local"
1900 a=${NSA_IP}
1904 run_cmd nettest ${varg} -d ${NSA_DEV} -r ${a} &
1908 log_test_addr ${a} 0 0 "${desc}, global server, enslaved device client, local"
1915 run_cmd nettest ${varg} -d ${NSA_DEV} -r ${a} &
1919 log_test_addr ${a} 0 0 "${desc}, VRF server, enslaved device client, local"
1926 run_cmd nettest ${varg} -d ${NSA_DEV} -r ${a} &
1930 log_test_addr ${a} 0 0 "${desc}, enslaved device server and client, local"
1936 local a
1938 for a in ${NSA_IP} ${VRF_IP}
1941 run_cmd_nsb ping -f ${a} &
1945 log_test_addr ${a} 0 0 "Device delete with active traffic - ping in"
1950 a=${NSB_IP}
1952 run_cmd ping -f -I ${VRF} ${a} &
1956 log_test_addr ${a} 0 0 "Device delete with active traffic - ping out"
1978 local a
1980 # should not have an impact, but make a known state
1986 for a in ${NSB_IP6} ${NSB_LO_IP6} ${NSB_LINKIP6}%${NSA_DEV} ${MCAST}%${NSA_DEV}
1989 run_cmd ${ping6} -c1 -w1 ${a}
1990 log_test_addr ${a} $? 0 "ping out"
1993 for a in ${NSB_IP6} ${NSB_LO_IP6}
1996 run_cmd ${ping6} -c1 -w1 -I ${NSA_DEV} ${a}
1997 log_test_addr ${a} $? 0 "ping out, device bind"
2000 run_cmd ${ping6} -c1 -w1 -I ${NSA_LO_IP6} ${a}
2001 log_test_addr ${a} $? 0 "ping out, loopback address bind"
2007 for a in ${NSA_IP6} ${NSA_LO_IP6} ${NSA_LINKIP6}%${NSB_DEV} ${MCAST}%${NSB_DEV}
2010 run_cmd_nsb ${ping6} -c1 -w1 ${a}
2011 log_test_addr ${a} $? 0 "ping in"
2017 for a in ${NSA_IP6} ${NSA_LO_IP6} ::1 ${NSA_LINKIP6}%${NSA_DEV} ${MCAST}%${NSA_DEV}
2020 run_cmd ${ping6} -c1 -w1 ${a}
2021 log_test_addr ${a} $? 0 "ping local, no bind"
2024 for a in ${NSA_IP6} ${NSA_LINKIP6}%${NSA_DEV} ${MCAST}%${NSA_DEV}
2027 run_cmd ${ping6} -c1 -w1 -I ${NSA_DEV} ${a}
2028 log_test_addr ${a} $? 0 "ping local, device bind"
2031 for a in ${NSA_LO_IP6} ::1
2035 run_cmd ${ping6} -c1 -w1 -I ${NSA_DEV} ${a}
2036 log_test_addr ${a} $? 2 "ping local, device bind"
2048 a=${NSB_LO_IP6}
2049 run_cmd ${ping6} -c1 -w1 ${a}
2050 log_test_addr ${a} $? 2 "ping out, blocked by rule"
2053 run_cmd ${ping6} -c1 -w1 -I ${NSA_DEV} ${a}
2054 log_test_addr ${a} $? 2 "ping out, device bind, blocked by rule"
2056 a=${NSA_LO_IP6}
2059 run_cmd_nsb ${ping6} -c1 -w1 ${a}
2060 log_test_addr ${a} $? 1 "ping in, blocked by rule"
2075 a=${NSB_LO_IP6}
2076 run_cmd ${ping6} -c1 -w1 ${a}
2077 log_test_addr ${a} $? 2 "ping out, blocked by route"
2080 run_cmd ${ping6} -c1 -w1 -I ${NSA_DEV} ${a}
2081 log_test_addr ${a} $? 2 "ping out, device bind, blocked by route"
2083 a=${NSA_LO_IP6}
2086 run_cmd_nsb ${ping6} -c1 -w1 ${a}
2087 log_test_addr ${a} $? 1 "ping in, blocked by route"
2097 a=${NSB_LO_IP6}
2098 run_cmd ${ping6} -c1 -w1 ${a}
2099 log_test_addr ${a} $? 2 "ping out, unreachable route"
2102 run_cmd ${ping6} -c1 -w1 -I ${NSA_DEV} ${a}
2103 log_test_addr ${a} $? 2 "ping out, device bind, unreachable route"
2108 local a
2116 for a in ${NSB_IP6} ${NSB_LO_IP6}
2119 run_cmd ${ping6} -c1 -w1 -I ${VRF} ${a}
2120 log_test_addr ${a} $? 0 "ping out, VRF bind"
2123 for a in ${NSB_LINKIP6}%${VRF} ${MCAST}%${VRF}
2127 run_cmd ${ping6} -c1 -w1 ${a}
2128 log_test_addr ${a} $? 2 "ping out, VRF bind"
2131 for a in ${NSB_IP6} ${NSB_LO_IP6} ${NSB_LINKIP6}%${NSA_DEV} ${MCAST}%${NSA_DEV}
2134 run_cmd ${ping6} -c1 -w1 -I ${NSA_DEV} ${a}
2135 log_test_addr ${a} $? 0 "ping out, device bind"
2138 for a in ${NSB_IP6} ${NSB_LO_IP6} ${NSB_LINKIP6}%${NSA_DEV}
2141 run_cmd ip vrf exec ${VRF} ${ping6} -c1 -w1 -I ${VRF_IP6} ${a}
2142 log_test_addr ${a} $? 0 "ping out, vrf device+address bind"
2148 for a in ${NSA_IP6} ${VRF_IP6} ${NSA_LINKIP6}%${NSB_DEV} ${MCAST}%${NSB_DEV}
2151 run_cmd_nsb ${ping6} -c1 -w1 ${a}
2152 log_test_addr ${a} $? 0 "ping in"
2155 a=${NSA_LO_IP6}
2158 run_cmd_nsb ${ping6} -c1 -w1 ${a}
2159 log_test_addr ${a} $? 1 "ping in"
2164 for a in ${NSA_IP6} ${VRF_IP6} ::1
2167 show_hint "Source address should be ${a}"
2168 run_cmd ${ping6} -c1 -w1 -I ${VRF} ${a}
2169 log_test_addr ${a} $? 0 "ping local, VRF bind"
2172 for a in ${NSA_IP6} ${NSA_LINKIP6}%${NSA_DEV} ${MCAST}%${NSA_DEV}
2175 run_cmd ${ping6} -c1 -w1 -I ${NSA_DEV} ${a}
2176 log_test_addr ${a} $? 0 "ping local, device bind"
2184 for a in ${NSA_IP6} ${VRF_IP6}
2188 log_test_addr ${a} $? 0 "ping in, LLA to GUA"
2202 a=${NSB_LO_IP6}
2203 run_cmd ${ping6} -c1 -w1 ${a}
2204 log_test_addr ${a} $? 2 "ping out, blocked by rule"
2207 run_cmd ${ping6} -c1 -w1 -I ${NSA_DEV} ${a}
2208 log_test_addr ${a} $? 2 "ping out, device bind, blocked by rule"
2210 a=${NSA_LO_IP6}
2213 run_cmd_nsb ${ping6} -c1 -w1 ${a}
2214 log_test_addr ${a} $? 1 "ping in, blocked by rule"
2226 a=${NSB_LO_IP6}
2227 run_cmd ${ping6} -c1 -w1 ${a}
2228 log_test_addr ${a} $? 2 "ping out, unreachable route"
2231 run_cmd ${ping6} -c1 -w1 -I ${NSA_DEV} ${a}
2232 log_test_addr ${a} $? 2 "ping out, device bind, unreachable route"
2235 a=${NSA_LO_IP6}
2237 run_cmd_nsb ${ping6} -c1 -w1 ${a}
2238 log_test_addr ${a} $? 2 "ping in, unreachable route"
2393 # duplicate config between default VRF and a VRF
2461 log_test $? 1 "MD5: VRF: Device must be a VRF - single address"
2465 log_test $? 1 "MD5: VRF: Device must be a VRF - prefix"
2471 local a
2476 for a in ${NSA_IP6} ${NSA_LO_IP6} ${NSA_LINKIP6}%${NSB_DEV}
2481 run_cmd_nsb nettest -6 -r ${a}
2482 log_test_addr ${a} $? 0 "Global server"
2486 for a in ${NSA_IP6} ${NSA_LO_IP6} ${NSA_LINKIP6}%${NSB_DEV}
2490 run_cmd_nsb nettest -6 -r ${a}
2491 log_test_addr ${a} $? 1 "No server"
2497 for a in ${NSB_IP6} ${NSB_LO_IP6} ${NSB_LINKIP6}%${NSA_DEV}
2502 run_cmd nettest -6 -r ${a}
2503 log_test_addr ${a} $? 0 "Client"
2506 for a in ${NSB_IP6} ${NSB_LO_IP6} ${NSB_LINKIP6}%${NSA_DEV}
2511 run_cmd nettest -6 -r ${a} -d ${NSA_DEV}
2512 log_test_addr ${a} $? 0 "Client, device bind"
2515 for a in ${NSB_IP6} ${NSB_LO_IP6} ${NSB_LINKIP6}%${NSA_DEV}
2519 run_cmd nettest -6 -r ${a} -d ${NSA_DEV}
2520 log_test_addr ${a} $? 1 "No server, device client"
2526 for a in ${NSA_IP6} ${NSA_LO_IP6} ::1
2531 run_cmd nettest -6 -r ${a}
2532 log_test_addr ${a} $? 0 "Global server, local connection"
2535 a=${NSA_IP6}
2539 run_cmd nettest -6 -r ${a} -0 ${a}
2540 log_test_addr ${a} $? 0 "Device server, unbound client, local connection"
2542 for a in ${NSA_LO_IP6} ::1
2548 run_cmd nettest -6 -r ${a}
2549 log_test_addr ${a} $? 1 "Device server, unbound client, local connection"
2552 a=${NSA_IP6}
2556 run_cmd nettest -6 -r ${a} -d ${NSA_DEV} -0 ${a}
2557 log_test_addr ${a} $? 0 "Global server, device client, local connection"
2559 for a in ${NSA_LO_IP6} ::1
2565 run_cmd nettest -6 -r ${a} -d ${NSA_DEV}
2566 log_test_addr ${a} $? 1 "Global server, device client, local connection"
2569 for a in ${NSA_IP6} ${NSA_LINKIP6}
2574 run_cmd nettest -6 -d ${NSA_DEV} -r ${a}
2575 log_test_addr ${a} $? 0 "Device server, device client, local conn"
2578 for a in ${NSA_IP6} ${NSA_LINKIP6}
2582 run_cmd nettest -6 -d ${NSA_DEV} -r ${a}
2583 log_test_addr ${a} $? 1 "No server, device client, local conn"
2591 local a
2601 for a in ${NSA_IP6} ${VRF_IP6} ${NSA_LINKIP6}%${NSB_DEV}
2607 run_cmd_nsb nettest -6 -r ${a}
2608 log_test_addr ${a} $? 1 "Global server"
2611 for a in ${NSA_IP6} ${VRF_IP6}
2616 run_cmd_nsb nettest -6 -r ${a}
2617 log_test_addr ${a} $? 0 "VRF server"
2621 a=${NSA_LINKIP6}%${NSB_DEV}
2625 run_cmd_nsb nettest -6 -r ${a}
2626 log_test_addr ${a} $? 0 "VRF server"
2628 for a in ${NSA_IP6} ${VRF_IP6} ${NSA_LINKIP6}%${NSB_DEV}
2633 run_cmd_nsb nettest -6 -r ${a}
2634 log_test_addr ${a} $? 0 "Device server"
2638 for a in ${NSA_IP6} ${VRF_IP6} ${NSA_LINKIP6}%${NSB_DEV}
2642 run_cmd_nsb nettest -6 -r ${a}
2643 log_test_addr ${a} $? 1 "No server"
2647 a=${NSA_IP6}
2652 run_cmd nettest -6 -r ${a} -d ${NSA_DEV}
2653 log_test_addr ${a} $? 1 "Global server, local connection"
2664 for a in ${NSA_IP6} ${VRF_IP6}
2669 run_cmd_nsb nettest -6 -r ${a}
2670 log_test_addr ${a} $? 0 "Global server"
2673 for a in ${NSA_IP6} ${VRF_IP6}
2678 run_cmd_nsb nettest -6 -r ${a}
2679 log_test_addr ${a} $? 0 "VRF server"
2683 a=${NSA_LINKIP6}%${NSB_DEV}
2687 run_cmd_nsb nettest -6 -r ${a}
2688 log_test_addr ${a} $? 0 "Global server"
2693 run_cmd_nsb nettest -6 -r ${a}
2694 log_test_addr ${a} $? 0 "VRF server"
2696 for a in ${NSA_IP6} ${NSA_LINKIP6}%${NSB_DEV}
2701 run_cmd_nsb nettest -6 -r ${a}
2702 log_test_addr ${a} $? 0 "Device server"
2706 for a in ${NSA_IP6} ${VRF_IP6} ${NSA_LINKIP6}%${NSB_DEV}
2710 run_cmd_nsb nettest -6 -r ${a}
2711 log_test_addr ${a} $? 1 "No server"
2715 for a in ${NSA_IP6} ${VRF_IP6}
2721 run_cmd nettest -6 -r ${a}
2722 log_test_addr ${a} $? 1 "Global server, local connection"
2729 for a in ${NSB_IP6} ${NSB_LO_IP6}
2734 run_cmd nettest -6 -r ${a} -d ${VRF}
2735 log_test_addr ${a} $? 0 "Client, VRF bind"
2738 a=${NSB_LINKIP6}
2743 run_cmd nettest -6 -r ${a} -d ${VRF}
2744 log_test_addr ${a} $? 1 "Client, VRF bind"
2746 for a in ${NSB_IP6} ${NSB_LO_IP6} ${NSB_LINKIP6}
2751 run_cmd nettest -6 -r ${a} -d ${NSA_DEV}
2752 log_test_addr ${a} $? 0 "Client, device bind"
2755 for a in ${NSB_IP6} ${NSB_LO_IP6}
2759 run_cmd nettest -6 -r ${a} -d ${VRF}
2760 log_test_addr ${a} $? 1 "No server, VRF client"
2763 for a in ${NSB_IP6} ${NSB_LO_IP6} ${NSB_LINKIP6}
2767 run_cmd nettest -6 -r ${a} -d ${NSA_DEV}
2768 log_test_addr ${a} $? 1 "No server, device client"
2771 for a in ${NSA_IP6} ${VRF_IP6} ::1
2776 run_cmd nettest -6 -r ${a} -d ${VRF} -0 ${a}
2777 log_test_addr ${a} $? 0 "VRF server, VRF client, local connection"
2780 a=${NSA_IP6}
2784 run_cmd nettest -6 -r ${a} -d ${NSA_DEV} -0 ${a}
2785 log_test_addr ${a} $? 0 "VRF server, device client, local connection"
2787 a=${NSA_IP6}
2792 run_cmd nettest -6 -r ${a}
2793 log_test_addr ${a} $? 1 "VRF server, unbound client, local connection"
2798 run_cmd nettest -6 -r ${a} -d ${VRF} -0 ${a}
2799 log_test_addr ${a} $? 0 "Device server, VRF client, local connection"
2801 for a in ${NSA_IP6} ${NSA_LINKIP6}
2806 run_cmd nettest -6 -r ${a} -d ${NSA_DEV} -0 ${a}
2807 log_test_addr ${a} $? 0 "Device server, device client, local connection"
2836 local a
2841 for a in ${NSA_IP6} ${NSA_LINKIP6}%${NSB_DEV}
2846 run_cmd_nsb nettest -6 -D -r ${a}
2847 log_test_addr ${a} $? 0 "Global server"
2852 run_cmd_nsb nettest -6 -D -r ${a}
2853 log_test_addr ${a} $? 0 "Device server"
2856 a=${NSA_LO_IP6}
2860 run_cmd_nsb nettest -6 -D -r ${a}
2861 log_test_addr ${a} $? 0 "Global server"
2863 # should fail since loopback address is out of scope for a device
2870 #run_cmd_nsb nettest -6 -D -r ${a}
2871 #log_test_addr ${a} $? 1 "Device server"
2874 for a in ${NSA_IP6} ${NSA_LO_IP6} ${NSA_LINKIP6}%${NSB_DEV}
2878 run_cmd_nsb nettest -6 -D -r ${a}
2879 log_test_addr ${a} $? 1 "No server"
2885 for a in ${NSB_IP6} ${NSB_LO_IP6} ${NSB_LINKIP6}%${NSA_DEV}
2890 run_cmd nettest -6 -D -r ${a} -0 ${NSA_IP6}
2891 log_test_addr ${a} $? 0 "Client"
2896 run_cmd nettest -6 -D -r ${a} -d ${NSA_DEV} -0 ${NSA_IP6}
2897 log_test_addr ${a} $? 0 "Client, device bind"
2902 run_cmd nettest -6 -D -r ${a} -d ${NSA_DEV} -C -0 ${NSA_IP6}
2903 log_test_addr ${a} $? 0 "Client, device send via cmsg"
2908 run_cmd nettest -6 -D -r ${a} -d ${NSA_DEV} -S -0 ${NSA_IP6}
2909 log_test_addr ${a} $? 0 "Client, device bind via IPV6_UNICAST_IF"
2913 run_cmd nettest -6 -D -r ${a}
2914 log_test_addr ${a} $? 1 "No server, unbound client"
2918 run_cmd nettest -6 -D -r ${a} -d ${NSA_DEV}
2919 log_test_addr ${a} $? 1 "No server, device client"
2925 for a in ${NSA_IP6} ${NSA_LO_IP6} ::1
2930 run_cmd nettest -6 -D -r ${a} -0 ${a} -1 ${a}
2931 log_test_addr ${a} $? 0 "Global server, local connection"
2934 a=${NSA_IP6}
2938 run_cmd nettest -6 -D -r ${a}
2939 log_test_addr ${a} $? 0 "Device server, unbound client, local connection"
2941 for a in ${NSA_LO_IP6} ::1
2947 run_cmd nettest -6 -D -r ${a}
2948 log_test_addr ${a} $? 1 "Device server, local connection"
2951 a=${NSA_IP6}
2955 run_cmd nettest -6 -D -d ${NSA_DEV} -r ${a}
2956 log_test_addr ${a} $? 0 "Global server, device client, local connection"
2961 run_cmd nettest -6 -D -d ${NSA_DEV} -C -r ${a}
2962 log_test_addr ${a} $? 0 "Global server, device send via cmsg, local connection"
2967 run_cmd nettest -6 -D -d ${NSA_DEV} -S -r ${a}
2968 log_test_addr ${a} $? 0 "Global server, device client via IPV6_UNICAST_IF, local connection"
2970 for a in ${NSA_LO_IP6} ::1
2976 run_cmd nettest -6 -D -r ${a} -d ${NSA_DEV}
2977 log_test_addr ${a} $? 1 "Global server, device client, local connection"
2983 run_cmd nettest -6 -D -r ${a} -d ${NSA_DEV} -C
2984 log_test_addr ${a} $? 1 "Global server, device send via cmsg, local connection"
2990 run_cmd nettest -6 -D -r ${a} -d ${NSA_DEV} -S
2991 log_test_addr ${a} $? 1 "Global server, device client via IP_UNICAST_IF, local connection"
2994 a=${NSA_IP6}
2998 run_cmd nettest -6 -D -d ${NSA_DEV} -r ${a} -0 ${a}
2999 log_test_addr ${a} $? 0 "Device server, device client, local conn"
3003 run_cmd nettest -6 -D -d ${NSA_DEV} -r ${a}
3004 log_test_addr ${a} $? 1 "No server, device client, local conn"
3021 local a
3030 for a in ${NSA_IP6} ${VRF_IP6}
3036 run_cmd_nsb nettest -6 -D -r ${a}
3037 log_test_addr ${a} $? 1 "Global server"
3040 for a in ${NSA_IP6} ${VRF_IP6}
3045 run_cmd_nsb nettest -6 -D -r ${a}
3046 log_test_addr ${a} $? 0 "VRF server"
3049 for a in ${NSA_IP6} ${VRF_IP6}
3054 run_cmd_nsb nettest -6 -D -r ${a}
3055 log_test_addr ${a} $? 0 "Enslaved device server"
3059 for a in ${NSA_IP6} ${VRF_IP6}
3063 run_cmd_nsb nettest -6 -D -r ${a}
3064 log_test_addr ${a} $? 1 "No server"
3070 for a in ${NSA_IP6} ${VRF_IP6}
3076 run_cmd nettest -6 -D -d ${VRF} -r ${a}
3077 log_test_addr ${a} $? 1 "Global server, VRF client, local conn"
3080 for a in ${NSA_IP6} ${VRF_IP6}
3085 run_cmd nettest -6 -D -d ${VRF} -r ${a}
3086 log_test_addr ${a} $? 0 "VRF server, VRF client, local conn"
3089 a=${NSA_IP6}
3094 run_cmd nettest -6 -D -d ${NSA_DEV} -r ${a}
3095 log_test_addr ${a} $? 1 "Global server, device client, local conn"
3100 run_cmd nettest -6 -D -d ${NSA_DEV} -r ${a}
3101 log_test_addr ${a} $? 0 "VRF server, device client, local conn"
3106 run_cmd nettest -6 -D -d ${VRF} -r ${a}
3107 log_test_addr ${a} $? 0 "Enslaved device server, VRF client, local conn"
3112 run_cmd nettest -6 -D -d ${NSA_DEV} -r ${a}
3113 log_test_addr ${a} $? 0 "Enslaved device server, device client, local conn"
3122 for a in ${NSA_IP6} ${VRF_IP6}
3127 run_cmd_nsb nettest -6 -D -r ${a}
3128 log_test_addr ${a} $? 0 "Global server"
3131 for a in ${NSA_IP6} ${VRF_IP6}
3136 run_cmd_nsb nettest -6 -D -r ${a}
3137 log_test_addr ${a} $? 0 "VRF server"
3140 for a in ${NSA_IP6} ${VRF_IP6}
3145 run_cmd_nsb nettest -6 -D -r ${a}
3146 log_test_addr ${a} $? 0 "Enslaved device server"
3150 for a in ${NSA_IP6} ${VRF_IP6}
3153 run_cmd_nsb nettest -6 -D -r ${a}
3154 log_test_addr ${a} $? 1 "No server"
3185 a=${NSA_IP6}
3189 run_cmd nettest -6 -D -d ${VRF} -r ${a}
3190 log_test_addr ${a} $? 0 "Global server, VRF client, local conn"
3195 run_cmd nettest -6 -D -d ${VRF} -r ${a}
3196 log_test_addr ${a} $? 0 "VRF server, VRF client, local conn"
3199 a=${VRF_IP6}
3203 run_cmd nettest -6 -D -d ${VRF} -r ${a}
3204 log_test_addr ${a} $? 0 "Global server, VRF client, local conn"
3209 run_cmd nettest -6 -D -d ${VRF} -r ${a}
3210 log_test_addr ${a} $? 0 "VRF server, VRF client, local conn"
3213 for a in ${NSA_IP6} ${VRF_IP6}
3216 run_cmd nettest -6 -D -d ${VRF} -r ${a}
3217 log_test_addr ${a} $? 1 "No server, VRF client, local conn"
3221 a=${NSA_IP6}
3225 run_cmd nettest -6 -D -d ${NSA_DEV} -r ${a}
3226 log_test_addr ${a} $? 0 "Global server, device client, local conn"
3231 run_cmd nettest -6 -D -d ${NSA_DEV} -r ${a}
3232 log_test_addr ${a} $? 0 "VRF server, device client, local conn"
3237 run_cmd nettest -6 -D -d ${VRF} -r ${a}
3238 log_test_addr ${a} $? 0 "Device server, VRF client, local conn"
3243 run_cmd nettest -6 -D -d ${NSA_DEV} -r ${a}
3244 log_test_addr ${a} $? 0 "Device server, device client, local conn"
3247 run_cmd nettest -6 -D -d ${NSA_DEV} -r ${a}
3248 log_test_addr ${a} $? 1 "No server, device client, local conn"
3328 for a in ${NSA_IP6} ${NSA_LO_IP6}
3331 run_cmd nettest -6 -s -R -P ipv6-icmp -l ${a} -b
3332 log_test_addr ${a} $? 0 "Raw socket bind to local address"
3335 run_cmd nettest -6 -s -R -P ipv6-icmp -l ${a} -d ${NSA_DEV} -b
3336 log_test_addr ${a} $? 0 "Raw socket bind to local address after device bind"
3342 a=${NSA_IP6}
3344 run_cmd nettest -6 -s -l ${a} -t1 -b
3345 log_test_addr ${a} $? 0 "TCP socket bind to local address"
3348 run_cmd nettest -6 -s -l ${a} -d ${NSA_DEV} -t1 -b
3349 log_test_addr ${a} $? 0 "TCP socket bind to local address after device bind"
3351 a=${NSA_LO_IP6}
3354 run_cmd nettest -6 -s -l ${a} -d ${NSA_DEV} -t1 -b
3355 log_test_addr ${a} $? 1 "TCP socket bind to out of scope local address"
3363 for a in ${NSA_IP6} ${VRF_IP6}
3366 run_cmd nettest -6 -s -R -P ipv6-icmp -l ${a} -d ${VRF} -b
3367 log_test_addr ${a} $? 0 "Raw socket bind to local address after vrf bind"
3370 run_cmd nettest -6 -s -R -P ipv6-icmp -l ${a} -d ${NSA_DEV} -b
3371 log_test_addr ${a} $? 0 "Raw socket bind to local address after device bind"
3374 a=${NSA_LO_IP6}
3377 run_cmd nettest -6 -s -R -P ipv6-icmp -l ${a} -d ${VRF} -b
3378 log_test_addr ${a} $? 1 "Raw socket bind to invalid local address after vrf bind"
3383 # address on enslaved device is valid for the VRF or device in a VRF
3384 for a in ${NSA_IP6} ${VRF_IP6}
3387 run_cmd nettest -6 -s -l ${a} -d ${VRF} -t1 -b
3388 log_test_addr ${a} $? 0 "TCP socket bind to local address with VRF bind"
3391 a=${NSA_IP6}
3393 run_cmd nettest -6 -s -l ${a} -d ${NSA_DEV} -t1 -b
3394 log_test_addr ${a} $? 0 "TCP socket bind to local address with device bind"
3396 a=${VRF_IP6}
3398 run_cmd nettest -6 -s -l ${a} -d ${NSA_DEV} -t1 -b
3399 log_test_addr ${a} $? 1 "TCP socket bind to VRF address with device bind"
3401 a=${NSA_LO_IP6}
3404 run_cmd nettest -6 -s -l ${a} -d ${VRF} -t1 -b
3405 log_test_addr ${a} $? 1 "TCP socket bind to invalid local address for VRF"
3409 run_cmd nettest -6 -s -l ${a} -d ${NSA_DEV} -t1 -b
3410 log_test_addr ${a} $? 1 "TCP socket bind to invalid local address for device bind"
3435 local a
3440 for a in ${NSA_IP6} ${VRF_IP6}
3445 run_cmd_nsb nettest ${varg} -r ${a} &
3449 log_test_addr ${a} 0 0 "${desc}, global server"
3454 for a in ${NSA_IP6} ${VRF_IP6}
3459 run_cmd_nsb nettest ${varg} -r ${a} &
3463 log_test_addr ${a} 0 0 "${desc}, VRF server"
3468 for a in ${NSA_IP6} ${VRF_IP6}
3473 run_cmd_nsb nettest ${varg} -r ${a} &
3477 log_test_addr ${a} 0 0 "${desc}, enslaved device server"
3511 for a in ${NSA_IP6} ${VRF_IP6}
3516 run_cmd nettest ${varg} -d ${VRF} -r ${a} &
3520 log_test_addr ${a} 0 0 "${desc}, global server, VRF client"
3525 for a in ${NSA_IP6} ${VRF_IP6}
3530 run_cmd nettest ${varg} -d ${VRF} -r ${a} &
3534 log_test_addr ${a} 0 0 "${desc}, VRF server and client"
3539 a=${NSA_IP6}
3543 run_cmd nettest ${varg} -d ${NSA_DEV} -r ${a} &
3547 log_test_addr ${a} 0 0 "${desc}, global server, device client"
3554 run_cmd nettest ${varg} -d ${NSA_DEV} -r ${a} &
3558 log_test_addr ${a} 0 0 "${desc}, VRF server, device client"
3565 run_cmd nettest ${varg} -d ${NSA_DEV} -r ${a} &
3569 log_test_addr ${a} 0 0 "${desc}, device server, device client"
3575 local a
3577 a=${NSA_IP6}
3579 run_cmd_nsb ${ping6} -f ${a} &
3583 log_test_addr ${a} 0 0 "Device delete with active traffic - ping in"
3592 log_test_addr ${a} 0 0 "Device delete with active traffic - ping out"
3617 local a
3619 for a in ${NSA_IP} ${VRF_IP}
3624 run_cmd_nsb nettest -r ${a}
3625 log_test_addr ${a} $? 1 "Global server, reject with TCP-reset on Rx"
3633 local a
3637 for a in ${NSA_IP} ${VRF_IP}
3642 run_cmd_nsb nettest ${arg} -r ${a}
3643 log_test_addr ${a} $? 1 "Global ${stype} server, Rx reject icmp-port-unreach"
3653 run_cmd iptables -A INPUT -p tcp --dport 12345 -j REJECT --reject-with tcp-reset
3662 run_cmd iptables -A INPUT -p tcp --dport 12345 -j REJECT --reject-with icmp-port-unreachable
3663 run_cmd iptables -A INPUT -p udp --dport 12345 -j REJECT --reject-with icmp-port-unreachable
3674 local a
3676 for a in ${NSA_IP6} ${VRF_IP6}
3681 run_cmd_nsb nettest -6 -r ${a}
3682 log_test_addr ${a} $? 1 "Global server, reject with TCP-reset on Rx"
3690 local a
3694 for a in ${NSA_IP6} ${VRF_IP6}
3699 run_cmd_nsb nettest -6 ${arg} -r ${a}
3700 log_test_addr ${a} $? 1 "Global ${stype} server, Rx reject icmp-port-unreach"
3710 run_cmd ip6tables -A INPUT -p tcp --dport 12345 -j REJECT --reject-with tcp-reset
3718 run_cmd ip6tables -A INPUT -p tcp --dport 12345 -j REJECT --reject-with icmp6-port-unreachable
3719 run_cmd ip6tables -A INPUT -p udp --dport 12345 -j REJECT --reject-with icmp6-port-unreachable
3732 # ns-A device enslaved to bridge. Verify traffic with and without
3843 # ns-A device is connected to both ns-B and ns-C on a single VRF but only has
3848 # only want reply from ns-A
3859 # cycle/flap the first ns-A interface
3870 # cycle/flap the second ns-A interface