ping: fix some man pages and tests after r368045
MFC-with: r368045
This commit is contained in:
parent
3cde9171d2
commit
01f3f35447
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=368046
@ -16,7 +16,7 @@
|
|||||||
.\" $Id: traceroute.8,v 1.19 2000/09/21 08:44:19 leres Exp $
|
.\" $Id: traceroute.8,v 1.19 2000/09/21 08:44:19 leres Exp $
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd June 20, 2019
|
.Dd November 25, 2020
|
||||||
.Dt TRACEROUTE 8
|
.Dt TRACEROUTE 8
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -377,7 +377,6 @@ during normal operations or from automated scripts.
|
|||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
.Xr netstat 1 ,
|
.Xr netstat 1 ,
|
||||||
.Xr ping 8 ,
|
.Xr ping 8 ,
|
||||||
.Xr ping6 8 ,
|
|
||||||
.Xr traceroute6 8 .
|
.Xr traceroute6 8 .
|
||||||
.Sh AUTHORS
|
.Sh AUTHORS
|
||||||
Implemented by Van Jacobson from a suggestion by Steve Deering. Debugged
|
Implemented by Van Jacobson from a suggestion by Steve Deering. Debugged
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
.\"
|
.\"
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd August 14, 2018
|
.Dd November 25, 2020
|
||||||
.Dt INET6 4
|
.Dt INET6 4
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -130,7 +130,7 @@ or
|
|||||||
are able to use this notation.
|
are able to use this notation.
|
||||||
With special programs
|
With special programs
|
||||||
like
|
like
|
||||||
.Xr ping6 8 ,
|
.Xr ping 8 ,
|
||||||
you can specify the outgoing interface by an extra command line option
|
you can specify the outgoing interface by an extra command line option
|
||||||
to disambiguate scoped addresses.
|
to disambiguate scoped addresses.
|
||||||
.Pp
|
.Pp
|
||||||
|
@ -137,7 +137,7 @@ basic_v6_body()
|
|||||||
carp_basic_v6_three ${epair_two}b
|
carp_basic_v6_three ${epair_two}b
|
||||||
|
|
||||||
atf_check -s exit:0 -o ignore jexec carp_basic_v6_one \
|
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()
|
basic_v6_cleanup()
|
||||||
|
@ -74,7 +74,7 @@ exthdr_body() {
|
|||||||
pyname=$(atf_get ident)
|
pyname=$(atf_get ident)
|
||||||
pyname=${pyname%*_[0-9]}
|
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 \
|
atf_check -s exit:0 $(atf_get_srcdir)/${pyname}.py \
|
||||||
--sendif ${epair}a --recvif ${epair}a \
|
--sendif ${epair}a --recvif ${epair}a \
|
||||||
|
@ -100,7 +100,7 @@ lpm6_test1_success_body()
|
|||||||
valid_message="${count} packets transmitted, ${count} packets received"
|
valid_message="${count} packets transmitted, ${count} packets received"
|
||||||
|
|
||||||
# Check that ${net_dst}:2:0 goes via epair0
|
# 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_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}'`
|
pkt_1=`jexec ${jname}a netstat -Wf link -I ${epair1}a | head | awk '$1!~/^Name/{print$8}'`
|
||||||
if [ ${pkt_0} -le ${count} ]; then
|
if [ ${pkt_0} -le ${count} ]; then
|
||||||
@ -109,7 +109,7 @@ lpm6_test1_success_body()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Check that ${net_dst}:2:1 goes via epair1
|
# 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_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}'`
|
pkt_1=`jexec ${jname}a netstat -Wf link -I ${epair1}a | head | awk '$1!~/^Name/{print$8}'`
|
||||||
if [ ${pkt_1} -le ${count} ]; then
|
if [ ${pkt_1} -le ${count} ]; then
|
||||||
@ -163,7 +163,7 @@ lpm6_test2_success_body()
|
|||||||
valid_message="${count} packets transmitted, ${count} packets received"
|
valid_message="${count} packets transmitted, ${count} packets received"
|
||||||
|
|
||||||
# Check that ${net_dst}:2:0 goes via epair1
|
# 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_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}'`
|
pkt_1=`jexec ${jname}a netstat -Wf link -I ${epair1}a | head | awk '$1!~/^Name/{print$8}'`
|
||||||
if [ ${pkt_1} -le ${count} ]; then
|
if [ ${pkt_1} -le ${count} ]; then
|
||||||
@ -172,7 +172,7 @@ lpm6_test2_success_body()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Check that ${net_dst}:2:2 goes via epair0
|
# 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_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}'`
|
pkt_1=`jexec ${jname}a netstat -Wf link -I ${epair1}a | head | awk '$1!~/^Name/{print$8}'`
|
||||||
if [ ${pkt_0} -le ${count} ]; then
|
if [ ${pkt_0} -le ${count} ]; then
|
||||||
|
@ -227,7 +227,7 @@ output6_raw_success_body()
|
|||||||
sleep 0.1
|
sleep 0.1
|
||||||
done
|
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()
|
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
|
jexec ${jname}b route add -6 -net ${net_src}::/${plen} ${ll}%${epair1}b
|
||||||
|
|
||||||
# Base setup verification
|
# 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
|
# run listener
|
||||||
num_ports=`echo ${ports} | wc -w`
|
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
|
jexec ${jname}b route add -6 -net ${net_src}::/${plen} ${ll}%${epair1}b
|
||||||
|
|
||||||
# Base setup verification
|
# 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
|
# run listener
|
||||||
num_ports=`echo ${ports} | wc -w`
|
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
|
jexec ${jname}b route add -6 -net ${net_src}::/${plen} ${ll}%${epair1}b
|
||||||
|
|
||||||
# Base setup verification
|
# 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
|
# run sender
|
||||||
valid_message='1 packets transmitted, 1 packets received'
|
valid_message='1 packets transmitted, 1 packets received'
|
||||||
for _ip in ${ips}; do
|
for _ip in ${ips}; do
|
||||||
ip="${net_dst}:${_ip}"
|
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
|
done
|
||||||
|
|
||||||
pkt_0=`jexec ${jname}a netstat -Wf link -I ${epair0}a | head | awk '$1!~/^Name/{print$8}'`
|
pkt_0=`jexec ${jname}a netstat -Wf link -I ${epair0}a | head | awk '$1!~/^Name/{print$8}'`
|
||||||
|
@ -124,7 +124,7 @@ ist_test()
|
|||||||
if [ $1 -eq 4 ]; then
|
if [ $1 -eq 4 ]; then
|
||||||
atf_check -s exit:0 -o ignore jexec hostA ping -c 1 203.0.113.1
|
atf_check -s exit:0 -o ignore jexec hostA ping -c 1 203.0.113.1
|
||||||
else
|
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
|
fi
|
||||||
}
|
}
|
||||||
ist_cleanup()
|
ist_cleanup()
|
||||||
|
@ -99,7 +99,7 @@ v6_body()
|
|||||||
"ipf" \
|
"ipf" \
|
||||||
"block in all"
|
"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
|
# Pass All
|
||||||
firewall_config "iron" ${firewall} \
|
firewall_config "iron" ${firewall} \
|
||||||
@ -110,7 +110,7 @@ v6_body()
|
|||||||
"ipf" \
|
"ipf" \
|
||||||
"pass in all"
|
"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()
|
v6_cleanup()
|
||||||
|
@ -112,23 +112,23 @@ v6_body()
|
|||||||
|
|
||||||
# Host test
|
# Host test
|
||||||
atf_check -s exit:0 -o ignore \
|
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 \
|
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\
|
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
|
# Forwarding test
|
||||||
atf_check -s exit:0 -o ignore \
|
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 \
|
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\
|
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 \
|
$(atf_get_srcdir)/CVE-2019-5597.py \
|
||||||
${epair_send}a \
|
${epair_send}a \
|
||||||
|
@ -85,23 +85,23 @@ v6_body()
|
|||||||
jexec alcatraz ifconfig ${epair}b inet6 2001:db8:42::2/64 up no_dad
|
jexec alcatraz ifconfig ${epair}b inet6 2001:db8:42::2/64 up no_dad
|
||||||
|
|
||||||
# Trivial ping to the jail, without pf
|
# 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
|
# pf without policy will let us ping
|
||||||
jexec alcatraz pfctl -e
|
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
|
# Block everything
|
||||||
pft_set_rules alcatraz "block in"
|
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
|
# Block everything but ICMP
|
||||||
pft_set_rules alcatraz "block in" "pass in proto icmp6"
|
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
|
# Allowing ICMPv4 does not allow ICMPv6
|
||||||
pft_set_rules alcatraz "block in" "pass in proto icmp"
|
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()
|
v6_cleanup()
|
||||||
@ -132,21 +132,21 @@ noalias_body()
|
|||||||
| cut -d % -f 1)
|
| cut -d % -f 1)
|
||||||
|
|
||||||
# Sanity check
|
# 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 ping -6 -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 ${linklocaladdr}%${epair}a
|
||||||
|
|
||||||
jexec alcatraz pfctl -e
|
jexec alcatraz pfctl -e
|
||||||
pft_set_rules alcatraz "block out inet6 from (${epair}b:0) to any"
|
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
|
# 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"
|
pft_set_rules alcatraz "block out inet6 from (${epair}b) to any"
|
||||||
|
|
||||||
# We cannot ping to the link-local address
|
# 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()
|
noalias_cleanup()
|
||||||
|
@ -93,7 +93,7 @@ v6_counters_body()
|
|||||||
"pass in from <foo6> to any" \
|
"pass in from <foo6> to any" \
|
||||||
"pass out from any to <foo6>"
|
"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 \
|
atf_check -s exit:0 -e ignore \
|
||||||
-o match:'In/Block:.*'"$TABLE_STATS_ZERO_REGEXP" \
|
-o match:'In/Block:.*'"$TABLE_STATS_ZERO_REGEXP" \
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
.\"
|
.\"
|
||||||
.\" $FreeBSD$
|
.\" $FreeBSD$
|
||||||
.\"
|
.\"
|
||||||
.Dd September 13, 2020
|
.Dd November 25, 2020
|
||||||
.Dt TRACEROUTE6 8
|
.Dt TRACEROUTE6 8
|
||||||
.Os
|
.Os
|
||||||
.\"
|
.\"
|
||||||
@ -202,7 +202,6 @@ utility will exit with 0 on success, and non-zero on errors.
|
|||||||
.\"
|
.\"
|
||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
.Xr ping 8 ,
|
.Xr ping 8 ,
|
||||||
.Xr ping6 8 ,
|
|
||||||
.Xr traceroute 8
|
.Xr traceroute 8
|
||||||
.\"
|
.\"
|
||||||
.Sh HISTORY
|
.Sh HISTORY
|
||||||
|
Loading…
Reference in New Issue
Block a user