3 # SPDX-License-Identifier: BSD-2-Clause
5 # Copyright (c) 2020 Alexander V. Chernikov
7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted provided that the following conditions
10 # 1. Redistributions of source code must retain the above copyright
11 # notice, this list of conditions and the following disclaimer.
12 # 2. Redistributions in binary form must reproduce the above copyright
13 # notice, this list of conditions and the following disclaimer in the
14 # documentation and/or other materials provided with the distribution.
16 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17 # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20 # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 . $(atf_get_srcdir)/../common/vnet.subr
33 atf_test_case "output6_tcp_setup_success" "cleanup"
34 output6_tcp_setup_success_head()
37 atf_set descr 'Test valid IPv6 TCP output'
38 atf_set require.user root
41 output6_tcp_setup_success_body()
46 net_src="2001:db8:0:0:1::"
47 net_dst="2001:db8:0:0:1::"
54 script_name=`dirname $0`/../common/net_receiver.py
55 script_name=`realpath ${script_name}`
56 jname="v6t-output6_tcp_setup_success"
60 vnet_mkjail ${jname}a ${epair}a
61 jexec ${jname}a ifconfig ${epair}a up
62 jexec ${jname}a ifconfig ${epair}a inet6 ${ip_src}/${plen}
64 vnet_mkjail ${jname}b ${epair}b
65 jexec ${jname}b ifconfig ${epair}b up
67 jexec ${jname}b ifconfig ${epair}b inet6 ${ip_dst}/${plen}
69 # wait for DAD to complete
70 while [ `jexec ${jname}b ifconfig ${epair}b inet6 | grep -c tentative` != "0" ]; do
73 while [ `jexec ${jname}a ifconfig ${epair}a inet6 | grep -c tentative` != "0" ]; do
78 args="--family inet6 --ports ${port} --match_str ${text}"
79 echo jexec ${jname}b ${script_name} ${args}
80 jexec ${jname}b ${script_name} --test_name "test_listen_tcp" ${args} &
83 # wait for the script init
85 while [ `jexec ${jname}b sockstat -6qlp ${port} | wc -l` != "1" ]; do
87 counter=$((counter+1))
88 if [ ${counter} -ge 50 ]; then break; fi
90 if [ `jexec ${jname}b sockstat -6qlp ${port} | wc -l` != "1" ]; then
91 echo "App setup failed"
96 echo -n "${text}" | jexec ${jname}a nc -N ${ip_dst} ${port}
98 if [ $exit_code -ne 0 ]; then atf_fail "sender exit code $exit_code" ; fi
102 if [ $exit_code -ne 0 ]; then atf_fail "receiver exit code $exit_code" ; fi
105 output6_tcp_setup_success_cleanup()
111 atf_test_case "output6_udp_setup_success" "cleanup"
112 output6_udp_setup_success_head()
115 atf_set descr 'Test valid IPv6 UDP output'
116 atf_set require.user root
119 output6_udp_setup_success_body()
124 net_src="2001:db8:0:0:1::"
125 net_dst="2001:db8:0:0:1::"
127 ip_dst=${net_dst}4242
132 script_name=`dirname $0`/../common/net_receiver.py
133 script_name=`realpath ${script_name}`
134 jname="v6t-output6_udp_setup_success"
136 epair=$(vnet_mkepair)
138 vnet_mkjail ${jname}a ${epair}a
139 jexec ${jname}a ifconfig ${epair}a up
140 jexec ${jname}a ifconfig ${epair}a inet6 ${ip_src}/${plen}
142 vnet_mkjail ${jname}b ${epair}b
143 jexec ${jname}b ifconfig ${epair}b up
144 jexec ${jname}b ifconfig ${epair}b inet6 ${ip_dst}/${plen}
146 # wait for DAD to complete
147 while [ `jexec ${jname}b ifconfig ${epair}b inet6 | grep -c tentative` != "0" ]; do
150 while [ `jexec ${jname}a ifconfig ${epair}a inet6 | grep -c tentative` != "0" ]; do
155 args="--family inet6 --ports ${port} --match_str ${text}"
156 echo jexec ${jname}b ${script_name} ${args}
157 jexec ${jname}b ${script_name} --test_name "test_listen_udp" ${args} &
160 # wait for the script init
162 while [ `jexec ${jname}b sockstat -6qlp ${port} | wc -l` != "1" ]; do
164 counterc=$((counter+1))
165 if [ ${counter} -ge 50 ]; then break; fi
167 if [ `jexec ${jname}b sockstat -6qlp ${port} | wc -l` != "1" ]; then
168 echo "App setup failed"
173 # TODO: switch from nc to some alternative to avoid 1-second delay
174 echo -n "${text}" | jexec ${jname}a nc -uNw1 ${ip_dst} ${port}
176 if [ $exit_code -ne 0 ]; then atf_fail "sender exit code $exit_code" ; fi
180 if [ $exit_code -ne 0 ]; then atf_fail "receiver exit code $exit_code" ; fi
183 output6_udp_setup_success_cleanup()
188 atf_test_case "output6_raw_success" "cleanup"
189 output6_raw_success_head()
192 atf_set descr 'Test valid IPv6 raw output'
193 atf_set require.user root
196 output6_raw_success_body()
201 net_src="2001:db8:0:0:1::"
202 net_dst="2001:db8:0:0:1::"
204 ip_dst=${net_dst}4242
207 script_name=`dirname $0`/../common/net_receiver.py
208 script_name=`realpath ${script_name}`
209 jname="v6t-output6_raw_success"
211 epair=$(vnet_mkepair)
213 vnet_mkjail ${jname}a ${epair}a
214 jexec ${jname}a ifconfig ${epair}a up
215 jexec ${jname}a ifconfig ${epair}a inet6 ${ip_src}/${plen}
217 vnet_mkjail ${jname}b ${epair}b
218 jexec ${jname}b ifconfig ${epair}b up
220 jexec ${jname}b ifconfig ${epair}b inet6 ${ip_dst}/${plen}
222 # wait for DAD to complete
223 while [ `jexec ${jname}b ifconfig ${epair}b inet6 | grep -c tentative` != "0" ]; do
226 while [ `jexec ${jname}a ifconfig ${epair}a inet6 | grep -c tentative` != "0" ]; do
230 atf_check -o match:'1 packets transmitted, 1 packets received' jexec ${jname}a ping6 -nc1 ${ip_dst}
233 output6_raw_success_cleanup()
238 # Multipath tests are done the following way:
240 # jailA lo/GU < > lo/GU jailB
242 # jailA has 2 routes towards /64 prefix on jailB loopback, via 2 epairs
243 # jailB has 1 route towards /64 prefix on jailA loopback, via epair0
245 # jailA initiates connections/sends packets towards IPs on jailB loopback.
246 # Script then compares amount of packets sent via epair0 and epair1
250 if [ `sysctl -iW net.route.multipath | wc -l` != "1" ]; then
251 atf_skip "This test requires ROUTE_MPATH enabled"
257 jexec $1 sysctl net.route.multipath=1
259 atf_fail "Setting multipath in jail $1 failed".
264 atf_test_case "output6_tcp_flowid_mpath_success" "cleanup"
265 output6_tcp_flowid_mpath_success_head()
268 atf_set descr 'Test valid IPv6 TCP output flowid generation'
269 atf_set require.user root
272 output6_tcp_flowid_mpath_success_body()
277 net_src="2001:db8:0:1"
278 net_dst="2001:db8:0:2"
279 ip_src="${net_src}::1"
280 ip_dst="${net_dst}::1"
284 script_name=`dirname $0`/../common/net_receiver.py
285 script_name=`realpath ${script_name}`
286 jname="v6t-output6_tcp_flowid_mpath_success"
288 epair0=$(vnet_mkepair)
289 epair1=$(vnet_mkepair)
290 lo_src=$(vnet_mkloopback)
291 lo_dst=$(vnet_mkloopback)
293 vnet_mkjail ${jname}a ${epair0}a ${epair1}a ${lo_src}
294 mpath_enable ${jname}a
296 # enable link-local IPv6
297 jexec ${jname}a ndp -i ${epair0}a -- -disabled
298 jexec ${jname}a ifconfig ${epair0}a up
299 jexec ${jname}a ndp -i ${epair1}a -- -disabled
300 jexec ${jname}a ifconfig ${epair1}a up
301 jexec ${jname}a ifconfig ${lo_src} up
303 vnet_mkjail ${jname}b ${epair0}b ${epair1}b ${lo_dst}
305 jexec ${jname}b ndp -i ${epair0}b -- -disabled
306 jexec ${jname}b ifconfig ${epair0}b up
307 jexec ${jname}b ndp -i ${epair1}b -- -disabled
308 jexec ${jname}b ifconfig ${epair1}b up
309 jexec ${jname}b ifconfig ${lo_dst} up
311 # DST ips/ports to test
312 ips="d3:c4:eb:40 2b:ff:dd:52 b1:d4:44:0e 41:2c:4d:43 66:4a:b4:be 8b:da:ac:f7 ca:d1:c4:f0 b1:31:da:d7 0c:ac:45:7a 44:9c:ce:71"
313 ports="53540 49743 43067 9131 16734 5150 14379 40292 20634 51302 3387 24387 9282 14275 42103 26881 42461 29520 45714 11096"
315 jexec ${jname}a ifconfig ${lo_src} inet6 ${ip_src}/128
317 jexec ${jname}b ifconfig ${lo_dst} inet6 ${ip_dst}/128
319 jexec ${jname}b ifconfig ${lo_dst} inet6 ${net_dst}:${i}/128
322 # wait for DAD to complete
323 while [ `jexec ${jname}b ifconfig | grep inet6 | grep -c tentative` != "0" ]; do
326 while [ `jexec ${jname}a ifconfig | grep inet6 | grep -c tentative` != "0" ]; do
331 # A -> towards B via epair0a LL
332 ll=`jexec ${jname}b ifconfig ${epair0}b inet6 | awk '$2~/^fe80:/{print$2}' | awk -F% '{print$1}'`
333 jexec ${jname}a route add -6 -net ${net_dst}::/${plen} ${ll}%${epair0}a
334 # A -> towards B via epair1a LL
335 ll=`jexec ${jname}b ifconfig ${epair1}b inet6 | awk '$2~/^fe80:/{print$2}' | awk -F% '{print$1}'`
336 jexec ${jname}a route add -6 -net ${net_dst}::/${plen} ${ll}%${epair1}a
338 # B towards A via epair0b LL
339 ll=`jexec ${jname}a ifconfig ${epair1}a inet6 | awk '$2~/^fe80:/{print$2}' | awk -F% '{print$1}'`
340 jexec ${jname}b route add -6 -net ${net_src}::/${plen} ${ll}%${epair1}b
342 # Base setup verification
343 atf_check -o match:'1 packets transmitted, 1 packets received' jexec ${jname}a ping6 -c1 ${ip_dst}
346 num_ports=`echo ${ports} | wc -w`
347 num_ips=`echo ${ips} | wc -w`
348 count_examples=$((num_ports*num_ips))
349 listener_ports=`echo ${ports} | tr ' ' '\n' | sort -n | tr '\n' ',' | sed -e 's?,$??'`
350 args="--family inet6 --ports ${listener_ports} --count ${count_examples} --match_str ${text}"
351 echo jexec ${jname}b ${script_name} ${args}
352 jexec ${jname}b ${script_name} --test_name "test_listen_tcp" ${args} &
355 # wait for the app init
358 while [ ${counter} -le 50 ]; do
359 _ports=`jexec ${jname}b sockstat -6ql | awk "\\\$3 == ${cmd_pid} {print \\\$6}"|awk -F: "{print \\\$2}" | sort -n | tr '\n' ','`
360 if [ "${_ports}" = "${listener_ports}," ]; then
365 if [ ${init} -eq 0 ]; then
366 jexec ${jname}b sockstat -6ql | awk "\$3 == ${cmd_pid}"
367 echo "App setup failed"
370 echo "App setup done"
373 for _ip in ${ips}; do
374 ip="${net_dst}:${_ip}"
375 for port in ${ports}; do
376 echo -n "${text}" | jexec ${jname}a nc -nN ${ip} ${port}
378 if [ $exit_code -ne 0 ]; then atf_fail "sender exit code $exit_code" ; fi
384 if [ $exit_code -ne 0 ]; then atf_fail "receiver exit code $exit_code" ; fi
386 pkt_0=`jexec ${jname}a netstat -Wf link -I ${epair0}a | head | awk '$1!~/^Name/{print$8}'`
387 pkt_1=`jexec ${jname}a netstat -Wf link -I ${epair1}a | head | awk '$1!~/^Name/{print$8}'`
388 if [ ${pkt_0} -le 10 ]; then
389 atf_fail "Balancing failure: 1: ${pkt_0} 2: ${pkt_1}"
391 if [ ${pkt_1} -le 10 ]; then
392 atf_fail "Balancing failure: 1: ${pkt_0} 2: ${pkt_1}"
394 echo "TCP Balancing: 1: ${pkt_0} 2: ${pkt_1}"
397 output6_tcp_flowid_mpath_success_cleanup()
402 atf_test_case "output6_udp_flowid_mpath_success" "cleanup"
403 output6_udp_flowid_mpath_success_head()
406 atf_set descr 'Test valid IPv6 UDP output flowid generation'
407 atf_set require.user root
410 output6_udp_flowid_mpath_success_body()
416 # Note this test will spawn around ~100 nc processes
418 net_src="2001:db8:0:1"
419 net_dst="2001:db8:0:2"
420 ip_src="${net_src}::1"
421 ip_dst="${net_dst}::1"
425 script_name=`dirname $0`/../common/net_receiver.py
426 script_name=`realpath ${script_name}`
427 jname="v6t-output6_udp_flowid_mpath_success"
429 epair0=$(vnet_mkepair)
430 epair1=$(vnet_mkepair)
431 lo_src=$(vnet_mkloopback)
432 lo_dst=$(vnet_mkloopback)
434 vnet_mkjail ${jname}a ${epair0}a ${epair1}a ${lo_src}
435 mpath_enable ${jname}a
437 # enable link-local IPv6
438 jexec ${jname}a ndp -i ${epair0}a -- -disabled
439 jexec ${jname}a ifconfig ${epair0}a up
440 jexec ${jname}a ndp -i ${epair1}a -- -disabled
441 jexec ${jname}a ifconfig ${epair1}a up
442 jexec ${jname}a ifconfig ${lo_src} up
444 vnet_mkjail ${jname}b ${epair0}b ${epair1}b ${lo_dst}
446 jexec ${jname}b ndp -i ${epair0}b -- -disabled
447 jexec ${jname}b ifconfig ${epair0}b up
448 jexec ${jname}b ndp -i ${epair1}b -- -disabled
449 jexec ${jname}b ifconfig ${epair1}b up
450 jexec ${jname}b ifconfig ${lo_dst} up
452 # DST ips/ports to test
453 ips="d3:c4:eb:40 2b:ff:dd:52 b1:d4:44:0e 41:2c:4d:43 66:4a:b4:be 8b:da:ac:f7 ca:d1:c4:f0 b1:31:da:d7 0c:ac:45:7a 44:9c:ce:71"
454 ports="53540 49743 43067 9131 16734 5150 14379 40292 20634 51302 3387 24387 9282 14275 42103 26881 42461 29520 45714 11096"
456 jexec ${jname}a ifconfig ${lo_src} inet6 ${ip_src}/128
458 jexec ${jname}b ifconfig ${lo_dst} inet6 ${ip_dst}/128
460 jexec ${jname}b ifconfig ${lo_dst} inet6 ${net_dst}:${i}/128
464 # wait for DAD to complete
465 while [ `jexec ${jname}b ifconfig | grep inet6 | grep -c tentative` != "0" ]; do
468 while [ `jexec ${jname}a ifconfig | grep inet6 | grep -c tentative` != "0" ]; do
473 # A -> towards B via epair0a LL
474 ll=`jexec ${jname}b ifconfig ${epair0}b inet6 | awk '$2~/^fe80:/{print$2}' | awk -F% '{print$1}'`
475 jexec ${jname}a route add -6 -net ${net_dst}::/${plen} ${ll}%${epair0}a
476 # A -> towards B via epair1a LL
477 ll=`jexec ${jname}b ifconfig ${epair1}b inet6 | awk '$2~/^fe80:/{print$2}' | awk -F% '{print$1}'`
478 jexec ${jname}a route add -6 -net ${net_dst}::/${plen} ${ll}%${epair1}a
480 # B towards A via epair0b LL
481 ll=`jexec ${jname}a ifconfig ${epair1}a inet6 | awk '$2~/^fe80:/{print$2}' | awk -F% '{print$1}'`
482 jexec ${jname}b route add -6 -net ${net_src}::/${plen} ${ll}%${epair1}b
484 # Base setup verification
485 atf_check -o match:'1 packets transmitted, 1 packets received' jexec ${jname}a ping6 -c1 ${ip_dst}
488 num_ports=`echo ${ports} | wc -w`
489 num_ips=`echo ${ips} | wc -w`
490 count_examples=$((num_ports*num_ips))
491 listener_ports=`echo ${ports} | tr ' ' '\n' | sort -n | tr '\n' ',' | sed -e 's?,$??'`
492 args="--family inet6 --ports ${listener_ports} --count ${count_examples} --match_str ${text}"
493 echo jexec ${jname}b ${script_name} ${args}
494 jexec ${jname}b ${script_name} --test_name "test_listen_udp" ${args} &
497 # wait for the app init
500 while [ ${counter} -le 50 ]; do
501 _ports=`jexec ${jname}b sockstat -6ql | awk "\\\$3 == ${cmd_pid} {print \\\$6}"|awk -F: "{print \\\$2}" | sort -n | tr '\n' ','`
502 if [ "${_ports}" = "${listener_ports}," ]; then
507 if [ ${init} -eq 0 ]; then
508 jexec ${jname}b sockstat -6ql | awk "\$3 == ${cmd_pid}"
509 echo "App setup failed"
512 echo "App setup done"
515 for _ip in ${ips}; do
516 ip="${net_dst}:${_ip}"
517 for port in ${ports}; do
518 # XXX: switch to something that allows immediate exit
519 echo -n "${text}" | jexec ${jname}a nc -nuNw1 ${ip} ${port} &
526 if [ $exit_code -ne 0 ]; then atf_fail "receiver exit code $exit_code" ; fi
528 pkt_0=`jexec ${jname}a netstat -Wf link -I ${epair0}a | head | awk '$1!~/^Name/{print$8}'`
529 pkt_1=`jexec ${jname}a netstat -Wf link -I ${epair1}a | head | awk '$1!~/^Name/{print$8}'`
530 if [ ${pkt_0} -le 10 ]; then
531 atf_fail "Balancing failure: 1: ${pkt_0} 2: ${pkt_1}"
533 if [ ${pkt_1} -le 10 ]; then
534 atf_fail "Balancing failure: 1: ${pkt_0} 2: ${pkt_1}"
536 echo "UDP BALANCING: 1: ${pkt_0} 2: ${pkt_1}"
539 output6_udp_flowid_mpath_success_cleanup()
544 atf_test_case "output6_raw_flowid_mpath_success" "cleanup"
545 output6_raw_flowid_mpath_success_head()
548 atf_set descr 'Test valid IPv6 raw output flowid generation'
549 atf_set require.user root
552 output6_raw_flowid_mpath_success_body()
558 net_src="2001:db8:0:1"
559 net_dst="2001:db8:0:2"
560 ip_src="${net_src}::1"
561 ip_dst="${net_dst}::1"
565 jname="v6t-output6_raw_flowid_mpath_success"
567 epair0=$(vnet_mkepair)
568 epair1=$(vnet_mkepair)
569 lo_src=$(vnet_mkloopback)
570 lo_dst=$(vnet_mkloopback)
572 vnet_mkjail ${jname}a ${epair0}a ${epair1}a ${lo_src}
573 mpath_enable ${jname}a
575 # enable link-local IPv6
576 jexec ${jname}a ndp -i ${epair0}a -- -disabled
577 jexec ${jname}a ifconfig ${epair0}a up
578 jexec ${jname}a ndp -i ${epair1}a -- -disabled
579 jexec ${jname}a ifconfig ${epair1}a up
580 jexec ${jname}a ifconfig ${lo_src} up
582 vnet_mkjail ${jname}b ${epair0}b ${epair1}b ${lo_dst}
584 jexec ${jname}b ndp -i ${epair0}b -- -disabled
585 jexec ${jname}b ifconfig ${epair0}b up
586 jexec ${jname}b ndp -i ${epair1}b -- -disabled
587 jexec ${jname}b ifconfig ${epair1}b up
588 jexec ${jname}b ifconfig ${lo_dst} up
591 ips="9d:33:f2:7f 48:06:9a:0b cf:96:d5:78 76:da:8e:28 d4:66:38:1e ec:43:da:7c bb:f8:93:2f d3:c4:eb:40"
592 ips="${ips} c7:31:0e:ae 8d:ed:35:2e c0:e0:22:31 82:1c:4e:28 c1:00:60:3e 6a:4f:3b:6c 8e:a7:e9:57 2b:ff:dd:52"
593 ips="${ips} 88:44:79:5d 80:62:83:11 c8:e4:17:a6 e7:2a:45:d7 5a:92:0e:04 70:fc:6a:ee ce:24:4c:68 41:2c:4d:43"
594 ips="${ips} 57:2b:5e:a7 f9:e0:69:c6 cb:b9:e6:ed 28:88:5d:fa d6:19:ac:1d dc:de:37:d8 fe:39:55:c7 b1:31:da:d7"
596 jexec ${jname}a ifconfig ${lo_src} inet6 ${ip_src}/128
598 jexec ${jname}b ifconfig ${lo_dst} inet6 ${ip_dst}/128
600 jexec ${jname}b ifconfig ${lo_dst} inet6 ${net_dst}:${i}/128
603 # wait for DAD to complete
604 while [ `jexec ${jname}b ifconfig | grep inet6 | grep -c tentative` != "0" ]; do
607 while [ `jexec ${jname}a ifconfig | grep inet6 | grep -c tentative` != "0" ]; do
612 # A -> towards B via epair0a LL
613 ll=`jexec ${jname}b ifconfig ${epair0}b inet6 | awk '$2~/^fe80:/{print$2}' | awk -F% '{print$1}'`
614 jexec ${jname}a route add -6 -net ${net_dst}::/${plen} ${ll}%${epair0}a
615 # A -> towards B via epair1a LL
616 ll=`jexec ${jname}b ifconfig ${epair1}b inet6 | awk '$2~/^fe80:/{print$2}' | awk -F% '{print$1}'`
617 jexec ${jname}a route add -6 -net ${net_dst}::/${plen} ${ll}%${epair1}a
619 # B towards A via epair0b LL
620 ll=`jexec ${jname}a ifconfig ${epair1}a inet6 | awk '$2~/^fe80:/{print$2}' | awk -F% '{print$1}'`
621 jexec ${jname}b route add -6 -net ${net_src}::/${plen} ${ll}%${epair1}b
623 # Base setup verification
624 atf_check -o match:'1 packets transmitted, 1 packets received' jexec ${jname}a ping6 -nc1 ${ip_dst}
627 valid_message='1 packets transmitted, 1 packets received'
628 for _ip in ${ips}; do
629 ip="${net_dst}:${_ip}"
630 atf_check -o match:"${valid_message}" jexec ${jname}a ping6 -nc1 ${ip}
633 pkt_0=`jexec ${jname}a netstat -Wf link -I ${epair0}a | head | awk '$1!~/^Name/{print$8}'`
634 pkt_1=`jexec ${jname}a netstat -Wf link -I ${epair1}a | head | awk '$1!~/^Name/{print$8}'`
636 jexec ${jname}a netstat -bWf link -I ${epair0}a
637 jexec ${jname}a netstat -bWf link -I ${epair1}a
638 if [ ${pkt_0} -le 10 ]; then
639 atf_fail "Balancing failure: 1: ${pkt_0} 2: ${pkt_1}"
641 if [ ${pkt_1} -le 10 ]; then
642 atf_fail "Balancing failure: 1: ${pkt_0} 2: ${pkt_1}"
644 echo "RAW BALANCING: 1: ${pkt_0} 2: ${pkt_1}"
647 output6_raw_flowid_mpath_success_cleanup()
652 atf_init_test_cases()
654 atf_add_test_case "output6_tcp_setup_success"
655 atf_add_test_case "output6_udp_setup_success"
656 atf_add_test_case "output6_raw_success"
657 atf_add_test_case "output6_tcp_flowid_mpath_success"
658 atf_add_test_case "output6_udp_flowid_mpath_success"
659 atf_add_test_case "output6_raw_flowid_mpath_success"