Lines Matching +full:set +full:- +full:up
2 # SPDX-License-Identifier: BSD-2-Clause
36 ifconfig ${epair}a inet6 2001:db8::2/64 up no_dad
37 route -6 add default 2001:db8::1
40 jexec rtr ifconfig ${epair}b inet6 2001:db8::1/64 up no_dad
41 jexec rtr ifconfig ${epair_link}a 192.0.2.1/24 up
44 jexec dst ifconfig ${epair_link}b 192.0.2.2/24 up
48 atf_check -s exit:0 -o ignore \
49 ping6 -c 1 2001:db8::1
50 atf_check -s exit:0 -o ignore \
51 jexec dst ping -c 1 192.0.2.1
53 jexec rtr pfctl -e
58 state_policy="${1:-if-bound}"
61 "set reassemble yes" \
62 "set state-policy ${state_policy}" \
64 "pass inet6 proto icmp6 icmp6-type { neighbrsol, neighbradv }" \
65 "pass in on ${epair}b inet6 from any to 64:ff9b::/96 af-to inet from (${epair_link}a)"
70 state_policy="${1:-if-bound}"
73 # AF translation happens post-routing, traffic must be directed
75 # jexec rtr ifconfig ${epair_link}a inet6 2001:db8:2::1/64 up no_dad
76 jexec rtr route add -inet6 64:ff9b::/96 -iface ${epair_link}a;
78 "set reassemble yes" \
79 "set state-policy ${state_policy}" \
81 "pass inet6 proto icmp6 icmp6-type { neighbrsol, neighbradv }" \
83 "pass out on ${epair_link}a from any to 64:ff9b::/96 af-to inet from (${epair_link}a)"
98 atf_check -s exit:0 -o ignore \
99 ping6 -c 1 64:ff9b::192.0.2.2
102 atf_check -s exit:0 \
103 -o match:'5 packets transmitted, 5 packets received, 0.0% packet loss' \
104 ping6 -c 5 64:ff9b::192.0.2.2
124 atf_check -s exit:0 -o ignore \
125 ping6 -c 1 64:ff9b::192.0.2.2
128 atf_check -s exit:0 \
129 -o match:'5 packets transmitted, 5 packets received, 0.0% packet loss' \
130 ping6 -c 5 64:ff9b::192.0.2.2
149 atf_check -s exit:0 -o ignore \
150 ping6 -c 1 -s 1280 64:ff9b::192.0.2.2
152 atf_check -s exit:0 \
153 -o match:'3 packets transmitted, 3 packets received, 0.0% packet loss' \
154 ping6 -c 3 -s 2000 64:ff9b::192.0.2.2
155 atf_check -s exit:0 \
156 -o match:'3 packets transmitted, 3 packets received, 0.0% packet loss' \
157 ping6 -c 3 -s 10000 -b 20000 64:ff9b::192.0.2.2
176 atf_check -s exit:0 -o ignore \
177 ping6 -c 1 -s 1280 64:ff9b::192.0.2.2
179 atf_check -s exit:0 \
180 -o match:'3 packets transmitted, 3 packets received, 0.0% packet loss' \
181 ping6 -c 3 -s 2000 64:ff9b::192.0.2.2
182 atf_check -s exit:0 \
183 -o match:'3 packets transmitted, 3 packets received, 0.0% packet loss' \
184 ping6 -c 3 -s 10000 -b 20000 64:ff9b::192.0.2.2
195 atf_set descr 'TCP NAT64 test on inbound interface, if-bound states'
203 echo "foo" | jexec dst nc -l 1234 &
206 atf_check -s exit:0 -o ignore \
207 ping6 -c 3 64:ff9b::192.0.2.2
209 rcv=$(nc -w 3 -6 64:ff9b::c000:202 1234)
219 jexec rtr pfctl -qvvss | normalize_pfctl_s > $states
221 …"${epair_link}a tcp 192.0.2.1:[0-9]+ \(2001:db8::2\[[0-9]+\]\) -> 192.0.2.2:1234 \(64:ff9b::c000:2…
223 grep -qE "${state_regexp}" $states || atf_fail "State not found for '${state_regexp}'"
225 [ $(cat $states | grep tcp | wc -l) -eq 1 ] || atf_fail "Not exactly 1 state found!"
236 atf_set descr 'TCP NAT64 test on outbound interface, if-bound states'
244 echo "foo" | jexec dst nc -l 1234 &
247 atf_check -s exit:0 -o ignore \
248 ping6 -c 3 64:ff9b::192.0.2.2
250 rcv=$(nc -w 3 -6 64:ff9b::c000:202 1234)
259 jexec rtr pfctl -qvvss | normalize_pfctl_s > $states
261 …"${epair}b tcp 64:ff9b::c000:202\[1234\] <- 2001:db8::2\[[0-9]+\] .* 5:4 pkts.* rule 3 .*creatorid…
262 …"${epair_link}a tcp 192.0.2.1:[0-9]+ \(64:ff9b::c000:202\[1234\]\) -> 192.0.2.2:1234 \(2001:db8::2…
264 grep -qE "${state_regexp}" $states || atf_fail "State not found for '${state_regexp}'"
266 [ $(cat $states | grep tcp | wc -l) -eq 2 ] || atf_fail "Not exactly 2 states found!"
285 echo "foo" | jexec dst nc -l 1234 &
288 atf_check -s exit:0 -o ignore \
289 ping6 -c 3 64:ff9b::192.0.2.2
291 rcv=$(nc -w 3 -6 64:ff9b::c000:202 1234)
301 jexec rtr pfctl -qvvss | normalize_pfctl_s > $states
303 …"all tcp 192.0.2.1:[0-9]+ \(2001:db8::2\[[0-9]+\]\) -> 192.0.2.2:1234 \(64:ff9b::c000:202\[1234\]\…
305 grep -qE "${state_regexp}" $states || atf_fail "State not found for '${state_regexp}'"
307 [ $(cat $states | grep tcp | wc -l) -eq 1 ] || atf_fail "Not exactly 1 state found!"
326 echo "foo" | jexec dst nc -l 1234 &
329 atf_check -s exit:0 -o ignore \
330 ping6 -c 3 64:ff9b::192.0.2.2
332 rcv=$(nc -w 3 -6 64:ff9b::c000:202 1234)
341 jexec rtr pfctl -qvvss | normalize_pfctl_s > $states
343 "all tcp 64:ff9b::c000:202\[1234\] <- 2001:db8::2\[[0-9]+\] .* 5:4 pkts,.* rule 3 .*creatorid"\
344 …"all tcp 192.0.2.1:[0-9]+ \(64:ff9b::c000:202\[1234\]\) -> 192.0.2.2:1234 \(2001:db8::2\[[0-9]+\]\…
346 grep -qE "${state_regexp}" $states || atf_fail "State not found for '${state_regexp}'"
348 [ $(cat $states | grep tcp | wc -l) -eq 2 ] || atf_fail "Not exactly 2 states found!"
367 echo "foo" | jexec dst nc -u -l 1234 &
370 atf_check -s exit:0 -o ignore \
371 ping6 -c 3 64:ff9b::192.0.2.2
373 rcv=$(echo bar | nc -w 3 -6 -u 64:ff9b::c000:202 1234)
397 echo "foo" | jexec dst nc -u -l 1234 &
400 atf_check -s exit:0 -o ignore \
401 ping6 -c 3 64:ff9b::192.0.2.2
403 rcv=$(echo bar | nc -w 3 -6 -u 64:ff9b::c000:202 1234)
426 if ! kldstat -q -m sctp; then
430 echo "foo" | jexec dst nc --sctp -N -l 1234 &
433 atf_check -s exit:0 -o ignore \
434 ping6 -c 3 64:ff9b::192.0.2.2
436 rcv=$(echo bar | nc --sctp -w 3 -6 64:ff9b::c000:202 1234)
459 if ! kldstat -q -m sctp; then
463 echo "foo" | jexec dst nc --sctp -N -l 1234 &
466 atf_check -s exit:0 -o ignore \
467 ping6 -c 3 64:ff9b::192.0.2.2
469 rcv=$(echo bar | nc --sctp -w 3 -6 64:ff9b::c000:202 1234)
494 jexec dst pfctl -e
499 atf_check -s exit:0 -o ignore \
500 ping6 -c 1 -z 4 64:ff9b::192.0.2.2
501 atf_check -s exit:2 -o ignore \
502 ping6 -c 1 -z 8 64:ff9b::192.0.2.2
503 atf_check -s exit:0 -o ignore \
504 ping6 -c 1 -z 16 64:ff9b::192.0.2.2
506 jexec dst pfctl -sr -vv
528 ifconfig ${epair}a inet6 2001:db8::2/64 up no_dad
529 route -6 add default 2001:db8::1
532 jexec rtr ifconfig ${epair}b inet6 2001:db8::1/64 up no_dad
535 jexec dst ifconfig ${epair_link}b 192.0.2.2/24 up
539 atf_check -s exit:0 -o ignore \
540 ping6 -c 1 2001:db8::1
542 jexec rtr pfctl -e
545 "pass inet6 proto icmp6 icmp6-type { neighbrsol, neighbradv }" \
546 "pass in on ${epair}b inet6 from any to 64:ff9b::/96 af-to inet from (${epair_link}a)" \
548 atf_check -s exit:2 -o ignore \
549 ping6 -c 3 64:ff9b::192.0.2.2
571 ifconfig ${epair}a inet6 2001:db8::2/64 up no_dad
572 route -6 add default 2001:db8::1
575 jexec rtr ifconfig ${epair}b inet6 2001:db8::1/64 up no_dad
576 jexec rtr ifconfig ${epair_link}a 192.0.2.2/24 up
577 jexec rtr ifconfig ${epair_link}a inet alias 192.0.2.3/24 up
580 jexec dst ifconfig ${epair_link}b 192.0.2.254/24 up
584 atf_check -s exit:0 -o ignore \
585 jexec rtr ping -c 1 192.0.2.254
586 atf_check -s exit:0 -o ignore \
587 ping6 -c 1 2001:db8::1
588 atf_check -s exit:0 -o ignore \
589 jexec dst ping -c 1 192.0.2.2
590 atf_check -s exit:0 -o ignore \
591 jexec dst ping -c 1 192.0.2.3
593 jexec rtr pfctl -e
595 "set reassemble yes" \
596 "set state-policy if-bound" \
598 "pass inet6 proto icmp6 icmp6-type { neighbrsol, neighbradv }" \
599 … "pass in on ${epair}b inet6 from any to 64:ff9b::/96 af-to inet from 192.0.2.2/31 round-robin" \
602 jexec dst pfctl -e
606 atf_check -s exit:0 -o ignore \
607 ping6 -c 1 64:ff9b::192.0.2.254
608 atf_check -s exit:0 -o ignore \
609 ping6 -c 1 64:ff9b::192.0.2.254
612 atf_check -s exit:0 -o match:".*192.0.2.2.*" \
613 jexec dst pfctl -ss
614 atf_check -s exit:0 -o match:".*192.0.2.3.*" \
615 jexec dst pfctl -ss
637 ifconfig ${epair}a inet6 2001:db8::2/64 up no_dad
638 route -6 add default 2001:db8::1
641 jexec rtr ifconfig ${epair}b inet6 2001:db8::1/64 up no_dad
642 jexec rtr ifconfig ${epair_link}a 192.0.2.1/24 up
643 jexec rtr ifconfig ${epair_link}a inet alias 192.0.2.3/24 up
644 jexec rtr ifconfig ${epair_link}a inet alias 192.0.2.4/24 up
647 jexec dst ifconfig ${epair_link}b 192.0.2.2/24 up
651 atf_check -s exit:0 -o ignore \
652 ping6 -c 1 2001:db8::1
653 atf_check -s exit:0 -o ignore \
654 jexec dst ping -c 1 192.0.2.1
656 jexec rtr pfctl -e
658 "set reassemble yes" \
659 "set state-policy if-bound" \
661 "pass inet6 proto icmp6 icmp6-type { neighbrsol, neighbradv }" \
662 …n on ${epair}b inet6 from any to 64:ff9b::/96 af-to inet from { 192.0.2.1, 192.0.2.3, 192.0.2.4 } …
665 jexec dst pfctl -e
669 atf_check -s exit:0 -o ignore \
670 ping6 -c 1 64:ff9b::192.0.2.2
671 atf_check -s exit:0 -o ignore \
672 ping6 -c 1 64:ff9b::192.0.2.2
673 atf_check -s exit:0 -o ignore \
674 ping6 -c 1 64:ff9b::192.0.2.2
677 atf_check -s exit:0 -o match:".*192.0.2.1.*" \
678 jexec dst pfctl -ss
679 atf_check -s exit:0 -o match:".*192.0.2.3.*" \
680 jexec dst pfctl -ss
681 atf_check -s exit:0 -o match:".*192.0.2.4.*" \
682 jexec dst pfctl -ss
702 # Round-robin and random are allowed
703 echo "pass in on epair inet6 from any to 64:ff9b::/96 af-to inet from <wanaddr> round-robin" | \
704 atf_check -s exit:0 \
705 pfctl -f -
706 echo "pass in on epair inet6 from any to 64:ff9b::/96 af-to inet from <wanaddr> random" | \
707 atf_check -s exit:0 \
708 pfctl -f -
711 echo "pass in on epair inet6 from any to 64:ff9b::/96 af-to inet from <wanaddr> bitmask" | \
712 atf_check -s exit:1 \
713 -e match:"tables are not supported by pool type" \
714 pfctl -f -
736 ifconfig ${epair}a inet6 2001:db8::2/64 up no_dad
737 route -6 add default 2001:db8::1
740 jexec rtr ifconfig ${epair}b inet6 2001:db8::1/64 up no_dad
741 jexec rtr ifconfig ${epair_link}a 192.0.2.2/24 up
742 jexec rtr ifconfig ${epair_link}a inet alias 192.0.2.3/24 up
745 jexec dst ifconfig ${epair_link}b 192.0.2.254/24 up
749 atf_check -s exit:0 -o ignore \
750 ping6 -c 1 2001:db8::1
751 atf_check -s exit:0 -o ignore \
752 jexec dst ping -c 1 192.0.2.2
754 jexec rtr pfctl -e
756 "set reassemble yes" \
757 "set state-policy if-bound" \
760 "pass inet6 proto icmp6 icmp6-type { neighbrsol, neighbradv }" \
761 "pass in on ${epair}b inet6 from any to 64:ff9b::/96 af-to inet from <wanaddrs> round-robin"
764 jexec dst pfctl -e
768 atf_check -s exit:0 -o ignore \
769 ping6 -c 1 64:ff9b::192.0.2.254
770 atf_check -s exit:0 -o ignore \
771 ping6 -c 1 64:ff9b::192.0.2.254
774 atf_check -s exit:0 -o match:".*192.0.2.2.*" \
775 jexec dst pfctl -ss
776 atf_check -s exit:0 -o match:".*192.0.2.3.*" \
777 jexec dst pfctl -ss
794 ifconfig ${epair}a inet6 2001:db8::2/64 up no_dad
795 route -6 add default 2001:db8::1
798 jexec rtr ifconfig ${epair}b inet6 2001:db8::1/64 up no_dad
799 jexec rtr ifconfig ${epair_link}a 192.0.2.1/24 up
800 jexec rtr ifconfig ${epair_link}a inet alias 192.0.2.3/24 up
801 jexec rtr ifconfig ${epair_link}a inet alias 192.0.2.4/24 up
804 jexec dst ifconfig ${epair_link}b 192.0.2.2/24 up
808 atf_check -s exit:0 -o ignore \
809 ping6 -c 1 2001:db8::1
810 atf_check -s exit:0 -o ignore \
811 jexec dst ping -c 1 192.0.2.1
813 jexec rtr pfctl -e
815 "set reassemble yes" \
816 "set state-policy if-bound" \
819 "pass inet6 proto icmp6 icmp6-type { neighbrsol, neighbradv }" \
820 "pass in on ${epair}b inet6 from any to 64:ff9b::/96 af-to inet from <wanaddrs> ${pool_type}"
823 jexec dst pfctl -e
827 atf_check -s exit:0 -o ignore \
828 ping6 -c 1 64:ff9b::192.0.2.2
829 atf_check -s exit:0 -o ignore \
830 ping6 -c 1 64:ff9b::192.0.2.2
831 atf_check -s exit:0 -o ignore \
832 ping6 -c 1 64:ff9b::192.0.2.2
835 # up choosing the same source IP for all three connections.
836 if [ "${pool_type}" == "round-robin" ];
839 atf_check -s exit:0 -o match:".*192.0.2.1.*" \
840 jexec dst pfctl -ss
841 atf_check -s exit:0 -o match:".*192.0.2.3.*" \
842 jexec dst pfctl -ss
843 atf_check -s exit:0 -o match:".*192.0.2.4.*" \
844 jexec dst pfctl -ss
851 atf_set descr 'Use a table of IPv4 addresses in round-robin mode'
857 table_common_body round-robin
885 atf_set descr 'Test dummynet on af-to rules'
897 ifconfig ${epair}a inet6 2001:db8::2/64 up no_dad
898 route -6 add default 2001:db8::1
901 jexec rtr ifconfig ${epair}b inet6 2001:db8::1/64 up no_dad
902 jexec rtr ifconfig ${epair_link}a 192.0.2.1/24 up
905 jexec dst ifconfig ${epair_link}b 192.0.2.2/24 up
909 atf_check -s exit:0 -o ignore \
910 ping6 -c 1 2001:db8::1
911 atf_check -s exit:0 -o ignore \
912 jexec dst ping -c 1 192.0.2.1
914 jexec rtr pfctl -e
917 "set reassemble yes" \
918 "set state-policy if-bound" \
920 "pass inet6 proto icmp6 icmp6-type { neighbrsol, neighbradv }" \
921 "pass in on ${epair}b inet6 from any to 64:ff9b::/96 dnpipe 1 af-to inet from (${epair_link}a)"
925 atf_check -s exit:0 -o ignore \
926 ping6 -c 1 -t 2 64:ff9b::192.0.2.2
929 atf_check -s exit:2 -o ignore \
930 ping6 -c 1 -t 1 64:ff9b::192.0.2.2
953 ifconfig ${epair}a inet6 2001:db8:1::2/64 up no_dad
954 route -6 add default 2001:db8:1::1
957 jexec lan_rtr ifconfig ${epair}b inet6 2001:db8:1::1/64 up no_dad
958 jexec lan_rtr ifconfig ${epair_lan_link}a inet6 2001:db8::2/64 up no_dad
959 jexec lan_rtr route -6 add default 2001:db8::1
963 jexec rtr ifconfig ${epair_lan_link}b inet6 2001:db8::1/64 up no_dad
964 jexec rtr ifconfig ${epair_link}a 192.0.2.1/24 up
965 jexec rtr route -6 add default 2001:db8::2
968 jexec dst ifconfig ${epair_link}b 192.0.2.2/24 up
972 atf_check -s exit:0 -o ignore \
973 ping6 -c 1 2001:db8:1::1
974 atf_check -s exit:0 -o ignore \
975 ping6 -c 1 2001:db8::1
976 atf_check -s exit:0 -o ignore \
977 jexec dst ping -c 1 192.0.2.1
979 jexec rtr pfctl -e
981 "set reassemble yes" \
982 "set state-policy if-bound" \
984 "pass inet6 proto icmp6 icmp6-type { neighbrsol, neighbradv }" \
985 "pass in on ${epair_lan_link}b inet6 from any to 64:ff9b::/96 af-to inet from (${epair_link}a)"
988 atf_check -s exit:0 -o ignore \
989 ping6 -c 1 64:ff9b::192.0.2.2
992 atf_check -s exit:0 \
993 -o match:'5 packets transmitted, 5 packets received, 0.0% packet loss' \
994 ping6 -c 5 64:ff9b::192.0.2.2
1005 atf_set descr 'Test route-to on af-to rules'
1017 ifconfig ${epair}a inet6 2001:db8::2/64 up no_dad
1018 route -6 add default 2001:db8::1
1021 jexec rtr ifconfig ${epair}b inet6 2001:db8::1/64 up no_dad
1022 jexec rtr ifconfig ${epair_null}a 192.0.2.3/24 up
1023 jexec rtr ifconfig ${epair_link}a 192.0.2.1/24 up
1026 jexec dst ifconfig ${epair_link}b 192.0.2.2/24 up
1030 atf_check -s exit:0 -o ignore \
1031 ping6 -c 1 2001:db8::1
1033 jexec rtr pfctl -e
1035 "set reassemble yes" \
1036 "set state-policy if-bound" \
1038 "pass inet6 proto icmp6 icmp6-type { neighbrsol, neighbradv }" \
1039 …"pass in on ${epair}b route-to (${epair_link}a 192.0.2.2) inet6 from any to 64:ff9b::/96 af-to ine…
1041 atf_check -s exit:0 -o ignore \
1042 ping6 -c 3 64:ff9b::192.0.2.2
1045 jexec rtr pfctl -qvvss | normalize_pfctl_s > $states
1048 …"${epair}b ipv6-icmp 192.0.2.1:.* \(2001:db8::2\[[0-9]+\]\) -> 192.0.2.2:8 \(64:ff9b::c000:202\[[0…
1050 grep -qE "${state_regexp}" $states || atf_fail "State not found for '${state_regexp}'"
1062 atf_set descr 'Test reply-to on af-to rules'
1073 ifconfig ${epair}a inet6 2001:db8::2/64 up no_dad
1074 route -6 add default 2001:db8::1
1077 jexec rtr ifconfig ${epair}b inet6 2001:db8::1/64 up no_dad
1078 jexec rtr ifconfig ${epair_link}a 192.0.2.1/24 up
1081 jexec dst ifconfig ${epair_link}b 192.0.2.2/24 up
1085 atf_check -s exit:0 -o ignore \
1086 ping6 -c 1 2001:db8::1
1088 jexec rtr pfctl -e
1090 "set reassemble yes" \
1091 "set state-policy if-bound" \
1093 "pass inet6 proto icmp6 icmp6-type { neighbrsol, neighbradv }" \
1094 …"pass in on ${epair}b reply-to (${epair}b 2001:db8::2) inet6 from any to 64:ff9b::/96 af-to inet f…
1096 atf_check -s exit:0 -o ignore \
1097 ping6 -c 3 64:ff9b::192.0.2.2
1120 ifconfig ${epair_lan}a inet6 2001:db8::2/64 up no_dad
1121 route -6 add default 2001:db8::1
1124 jexec rtr ifconfig ${epair_lan}b inet6 2001:db8::1/64 up no_dad
1125 jexec rtr ifconfig ${epair_wan_one}a 192.0.2.1/24 up
1126 jexec rtr ifconfig ${epair_wan_one}a inet6 -ifdisabled
1127 jexec rtr route add default -inet6 fe80::1%${epair_wan_one}a
1131 jexec wan_one ifconfig ${epair_wan_one}b 192.0.2.2/24 up
1133 jexec wan_one ifconfig ${epair_wan_two}a 198.51.100.2/24 up
1138 jexec wan_two ifconfig ${epair_wan_two}b 198.51.100.1/24 up
1142 atf_check -s exit:0 -o ignore \
1143 ping6 -c 1 2001:db8::1
1144 atf_check -s exit:0 -o ignore \
1145 jexec rtr ping -c 1 192.0.2.2
1146 atf_check -s exit:0 -o ignore \
1147 jexec rtr ping -c 1 198.51.100.1
1149 jexec rtr pfctl -e
1151 "set reassemble yes" \
1152 "set state-policy if-bound" \
1154 "pass inet6 proto icmp6 icmp6-type { neighbrsol, neighbradv }" \
1155 "pass in on ${epair_lan}b inet6 from any to 64:ff9b::/96 af-to inet from (${epair_wan_one}a)"
1157 atf_check -s exit:0 -o ignore \
1158 ping6 -c 3 64:ff9b::192.0.2.2
1159 atf_check -s exit:0 -o ignore \
1160 ping6 -c 3 64:ff9b::198.51.100.1