ping: fix some man pages and tests after r368045

MFC-with:	r368045
This commit is contained in:
Alan Somers 2020-11-26 04:55:02 +00:00
parent 3cde9171d2
commit 01f3f35447
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=368046
12 changed files with 35 additions and 37 deletions

View File

@ -16,7 +16,7 @@
.\" $Id: traceroute.8,v 1.19 2000/09/21 08:44:19 leres Exp $
.\" $FreeBSD$
.\"
.Dd June 20, 2019
.Dd November 25, 2020
.Dt TRACEROUTE 8
.Os
.Sh NAME
@ -377,7 +377,6 @@ during normal operations or from automated scripts.
.Sh SEE ALSO
.Xr netstat 1 ,
.Xr ping 8 ,
.Xr ping6 8 ,
.Xr traceroute6 8 .
.Sh AUTHORS
Implemented by Van Jacobson from a suggestion by Steve Deering. Debugged

View File

@ -29,7 +29,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd August 14, 2018
.Dd November 25, 2020
.Dt INET6 4
.Os
.Sh NAME
@ -130,7 +130,7 @@ or
are able to use this notation.
With special programs
like
.Xr ping6 8 ,
.Xr ping 8 ,
you can specify the outgoing interface by an extra command line option
to disambiguate scoped addresses.
.Pp

View File

@ -137,7 +137,7 @@ basic_v6_body()
carp_basic_v6_three ${epair_two}b
atf_check -s exit:0 -o ignore jexec carp_basic_v6_one \
ping6 -c 3 2001:db8::0:1
ping -6 -c 3 2001:db8::0:1
}
basic_v6_cleanup()

View File

@ -74,7 +74,7 @@ exthdr_body() {
pyname=$(atf_get ident)
pyname=${pyname%*_[0-9]}
atf_check -o ignore -s exit:0 ping6 -c 3 -q -o ${ip6b}
atf_check -o ignore -s exit:0 ping -6 -c 3 -q -o ${ip6b}
atf_check -s exit:0 $(atf_get_srcdir)/${pyname}.py \
--sendif ${epair}a --recvif ${epair}a \

View File

@ -100,7 +100,7 @@ lpm6_test1_success_body()
valid_message="${count} packets transmitted, ${count} packets received"
# Check that ${net_dst}:2:0 goes via epair0
atf_check -o match:"${valid_message}" jexec ${jname}a ping6 -f -nc${count} ${net_dst}:2:0
atf_check -o match:"${valid_message}" jexec ${jname}a ping -6 -f -nc${count} ${net_dst}:2:0
pkt_0=`jexec ${jname}a netstat -Wf link -I ${epair0}a | head | awk '$1!~/^Name/{print$8}'`
pkt_1=`jexec ${jname}a netstat -Wf link -I ${epair1}a | head | awk '$1!~/^Name/{print$8}'`
if [ ${pkt_0} -le ${count} ]; then
@ -109,7 +109,7 @@ lpm6_test1_success_body()
fi
# Check that ${net_dst}:2:1 goes via epair1
atf_check -o match:"${valid_message}" jexec ${jname}a ping6 -f -nc${count} ${net_dst}:2:1
atf_check -o match:"${valid_message}" jexec ${jname}a ping -6 -f -nc${count} ${net_dst}:2:1
pkt_0=`jexec ${jname}a netstat -Wf link -I ${epair0}a | head | awk '$1!~/^Name/{print$8}'`
pkt_1=`jexec ${jname}a netstat -Wf link -I ${epair1}a | head | awk '$1!~/^Name/{print$8}'`
if [ ${pkt_1} -le ${count} ]; then
@ -163,7 +163,7 @@ lpm6_test2_success_body()
valid_message="${count} packets transmitted, ${count} packets received"
# Check that ${net_dst}:2:0 goes via epair1
atf_check -o match:"${valid_message}" jexec ${jname}a ping6 -f -nc${count} ${net_dst}:2:0
atf_check -o match:"${valid_message}" jexec ${jname}a ping -6 -f -nc${count} ${net_dst}:2:0
pkt_0=`jexec ${jname}a netstat -Wf link -I ${epair0}a | head | awk '$1!~/^Name/{print$8}'`
pkt_1=`jexec ${jname}a netstat -Wf link -I ${epair1}a | head | awk '$1!~/^Name/{print$8}'`
if [ ${pkt_1} -le ${count} ]; then
@ -172,7 +172,7 @@ lpm6_test2_success_body()
fi
# Check that ${net_dst}:2:2 goes via epair0
atf_check -o match:"${valid_message}" jexec ${jname}a ping6 -f -nc${count} ${net_dst}:2:2
atf_check -o match:"${valid_message}" jexec ${jname}a ping -6 -f -nc${count} ${net_dst}:2:2
pkt_0=`jexec ${jname}a netstat -Wf link -I ${epair0}a | head | awk '$1!~/^Name/{print$8}'`
pkt_1=`jexec ${jname}a netstat -Wf link -I ${epair1}a | head | awk '$1!~/^Name/{print$8}'`
if [ ${pkt_0} -le ${count} ]; then

View File

@ -227,7 +227,7 @@ output6_raw_success_body()
sleep 0.1
done
atf_check -o match:'1 packets transmitted, 1 packets received' jexec ${jname}a ping6 -nc1 ${ip_dst}
atf_check -o match:'1 packets transmitted, 1 packets received' jexec ${jname}a ping -6 -nc1 ${ip_dst}
}
output6_raw_success_cleanup()
@ -340,7 +340,7 @@ output6_tcp_flowid_mpath_success_body()
jexec ${jname}b route add -6 -net ${net_src}::/${plen} ${ll}%${epair1}b
# Base setup verification
atf_check -o match:'1 packets transmitted, 1 packets received' jexec ${jname}a ping6 -c1 ${ip_dst}
atf_check -o match:'1 packets transmitted, 1 packets received' jexec ${jname}a ping -6 -c1 ${ip_dst}
# run listener
num_ports=`echo ${ports} | wc -w`
@ -482,7 +482,7 @@ output6_udp_flowid_mpath_success_body()
jexec ${jname}b route add -6 -net ${net_src}::/${plen} ${ll}%${epair1}b
# Base setup verification
atf_check -o match:'1 packets transmitted, 1 packets received' jexec ${jname}a ping6 -c1 ${ip_dst}
atf_check -o match:'1 packets transmitted, 1 packets received' jexec ${jname}a ping -6 -c1 ${ip_dst}
# run listener
num_ports=`echo ${ports} | wc -w`
@ -621,13 +621,13 @@ output6_raw_flowid_mpath_success_body()
jexec ${jname}b route add -6 -net ${net_src}::/${plen} ${ll}%${epair1}b
# Base setup verification
atf_check -o match:'1 packets transmitted, 1 packets received' jexec ${jname}a ping6 -nc1 ${ip_dst}
atf_check -o match:'1 packets transmitted, 1 packets received' jexec ${jname}a ping -6 -nc1 ${ip_dst}
# run sender
valid_message='1 packets transmitted, 1 packets received'
for _ip in ${ips}; do
ip="${net_dst}:${_ip}"
atf_check -o match:"${valid_message}" jexec ${jname}a ping6 -nc1 ${ip}
atf_check -o match:"${valid_message}" jexec ${jname}a ping -6 -nc1 ${ip}
done
pkt_0=`jexec ${jname}a netstat -Wf link -I ${epair0}a | head | awk '$1!~/^Name/{print$8}'`

View File

@ -124,7 +124,7 @@ ist_test()
if [ $1 -eq 4 ]; then
atf_check -s exit:0 -o ignore jexec hostA ping -c 1 203.0.113.1
else
atf_check -s exit:0 -o ignore jexec hostA ping6 -c 1 2001:db8:45::1
atf_check -s exit:0 -o ignore jexec hostA ping -6 -c 1 2001:db8:45::1
fi
}
ist_cleanup()

View File

@ -99,7 +99,7 @@ v6_body()
"ipf" \
"block in all"
atf_check -s exit:2 -o ignore ping6 -c 1 -W 1 fd7a:803f:cc4b::2
atf_check -s exit:2 -o ignore ping -6 -c 1 -W 1 fd7a:803f:cc4b::2
# Pass All
firewall_config "iron" ${firewall} \
@ -110,7 +110,7 @@ v6_body()
"ipf" \
"pass in all"
atf_check -s exit:0 -o ignore ping6 -c 1 -W 1 fd7a:803f:cc4b::2
atf_check -s exit:0 -o ignore ping -6 -c 1 -W 1 fd7a:803f:cc4b::2
}
v6_cleanup()

View File

@ -112,23 +112,23 @@ v6_body()
# Host test
atf_check -s exit:0 -o ignore \
ping6 -c 1 2001:db8:42::2
ping -6 -c 1 2001:db8:42::2
atf_check -s exit:0 -o ignore \
ping6 -c 1 -s 4500 2001:db8:42::2
ping -6 -c 1 -s 4500 2001:db8:42::2
atf_check -s exit:0 -o ignore\
ping6 -c 1 -b 70000 -s 65000 2001:db8:42::2
ping -6 -c 1 -b 70000 -s 65000 2001:db8:42::2
# Forwarding test
atf_check -s exit:0 -o ignore \
ping6 -c 1 2001:db8:43::3
ping -6 -c 1 2001:db8:43::3
atf_check -s exit:0 -o ignore \
ping6 -c 1 -s 4500 2001:db8:43::3
ping -6 -c 1 -s 4500 2001:db8:43::3
atf_check -s exit:0 -o ignore\
ping6 -c 1 -b 70000 -s 65000 2001:db8:43::3
ping -6 -c 1 -b 70000 -s 65000 2001:db8:43::3
$(atf_get_srcdir)/CVE-2019-5597.py \
${epair_send}a \

View File

@ -85,23 +85,23 @@ v6_body()
jexec alcatraz ifconfig ${epair}b inet6 2001:db8:42::2/64 up no_dad
# Trivial ping to the jail, without pf
atf_check -s exit:0 -o ignore ping6 -c 1 -W 1 2001:db8:42::2
atf_check -s exit:0 -o ignore ping -6 -c 1 -W 1 2001:db8:42::2
# pf without policy will let us ping
jexec alcatraz pfctl -e
atf_check -s exit:0 -o ignore ping6 -c 1 -W 1 2001:db8:42::2
atf_check -s exit:0 -o ignore ping -6 -c 1 -W 1 2001:db8:42::2
# Block everything
pft_set_rules alcatraz "block in"
atf_check -s exit:2 -o ignore ping6 -c 1 -W 1 2001:db8:42::2
atf_check -s exit:2 -o ignore ping -6 -c 1 -W 1 2001:db8:42::2
# Block everything but ICMP
pft_set_rules alcatraz "block in" "pass in proto icmp6"
atf_check -s exit:0 -o ignore ping6 -c 1 -W 1 2001:db8:42::2
atf_check -s exit:0 -o ignore ping -6 -c 1 -W 1 2001:db8:42::2
# Allowing ICMPv4 does not allow ICMPv6
pft_set_rules alcatraz "block in" "pass in proto icmp"
atf_check -s exit:2 -o ignore ping6 -c 1 -W 1 2001:db8:42::2
atf_check -s exit:2 -o ignore ping -6 -c 1 -W 1 2001:db8:42::2
}
v6_cleanup()
@ -132,21 +132,21 @@ noalias_body()
| cut -d % -f 1)
# Sanity check
atf_check -s exit:0 -o ignore ping6 -c 3 -W 1 2001:db8:42::2
atf_check -s exit:0 -o ignore ping6 -c 3 -W 1 ${linklocaladdr}%${epair}a
atf_check -s exit:0 -o ignore ping -6 -c 3 -W 1 2001:db8:42::2
atf_check -s exit:0 -o ignore ping -6 -c 3 -W 1 ${linklocaladdr}%${epair}a
jexec alcatraz pfctl -e
pft_set_rules alcatraz "block out inet6 from (${epair}b:0) to any"
atf_check -s exit:2 -o ignore ping6 -c 3 -W 1 2001:db8:42::2
atf_check -s exit:2 -o ignore ping -6 -c 3 -W 1 2001:db8:42::2
# We should still be able to ping the link-local address
atf_check -s exit:0 -o ignore ping6 -c 3 -W 1 ${linklocaladdr}%${epair}a
atf_check -s exit:0 -o ignore ping -6 -c 3 -W 1 ${linklocaladdr}%${epair}a
pft_set_rules alcatraz "block out inet6 from (${epair}b) to any"
# We cannot ping to the link-local address
atf_check -s exit:2 -o ignore ping6 -c 3 -W 1 ${linklocaladdr}%${epair}a
atf_check -s exit:2 -o ignore ping -6 -c 3 -W 1 ${linklocaladdr}%${epair}a
}
noalias_cleanup()

View File

@ -93,7 +93,7 @@ v6_counters_body()
"pass in from <foo6> to any" \
"pass out from any to <foo6>"
atf_check -s exit:0 -o ignore ping6 -c 3 2001:db8:42::2
atf_check -s exit:0 -o ignore ping -6 -c 3 2001:db8:42::2
atf_check -s exit:0 -e ignore \
-o match:'In/Block:.*'"$TABLE_STATS_ZERO_REGEXP" \

View File

@ -29,7 +29,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd September 13, 2020
.Dd November 25, 2020
.Dt TRACEROUTE6 8
.Os
.\"
@ -202,7 +202,6 @@ utility will exit with 0 on success, and non-zero on errors.
.\"
.Sh SEE ALSO
.Xr ping 8 ,
.Xr ping6 8 ,
.Xr traceroute 8
.\"
.Sh HISTORY