Fix ping(8) and ping6(8) usage in a couple of ip provider tests, and
update expected test output to reflect differences in default TTL and payload length. MFC after: 1 week
This commit is contained in:
parent
3f05af05ac
commit
16a62fc514
@ -45,12 +45,13 @@ fi
|
||||
dtrace=$1
|
||||
local=127.0.0.1
|
||||
|
||||
$dtrace -c "/sbin/ping $local 3" -qs /dev/stdin <<EOF | sort -n
|
||||
$dtrace -c "/sbin/ping -q -c 1 -t 3 $local" -qs /dev/stdin <<EOF | sort -n | \
|
||||
grep -v -e '^round-trip ' -e '^--- '
|
||||
ip:::send
|
||||
/args[2]->ip_saddr == "$local" && args[2]->ip_daddr == "$local" &&
|
||||
args[4]->ipv4_protocol == IPPROTO_ICMP/
|
||||
{
|
||||
printf("1 ip:::send (");
|
||||
printf("2 ip:::send (");
|
||||
printf("args[2]: %d %d, ", args[2]->ip_ver, args[2]->ip_plength);
|
||||
printf("args[4]: %d %d %d %d %d)\n",
|
||||
args[4]->ipv4_ver, args[4]->ipv4_length, args[4]->ipv4_flags,
|
||||
@ -61,7 +62,7 @@ ip:::receive
|
||||
/args[2]->ip_saddr == "$local" && args[2]->ip_daddr == "$local" &&
|
||||
args[4]->ipv4_protocol == IPPROTO_ICMP/
|
||||
{
|
||||
printf("2 ip:::receive (");
|
||||
printf("3 ip:::receive (");
|
||||
printf("args[2]: %d %d, ", args[2]->ip_ver, args[2]->ip_plength);
|
||||
printf("args[4]: %d %d %d %d %d)\n",
|
||||
args[4]->ipv4_ver, args[4]->ipv4_length, args[4]->ipv4_flags,
|
||||
|
@ -1,6 +1,8 @@
|
||||
|
||||
1 ip:::send (args[2]: 4 64, args[4]: 4 84 0 0 255)
|
||||
1 ip:::send (args[2]: 4 64, args[4]: 4 84 0 0 255)
|
||||
2 ip:::receive (args[2]: 4 64, args[4]: 4 84 0 0 255)
|
||||
2 ip:::receive (args[2]: 4 64, args[4]: 4 84 0 0 255)
|
||||
127.0.0.1 is alive
|
||||
|
||||
PING 127.0.0.1 (127.0.0.1): 56 data bytes
|
||||
1 packets transmitted, 1 packets received, 0.0% packet loss
|
||||
2 ip:::send (args[2]: 4 64, args[4]: 4 84 0 0 64)
|
||||
2 ip:::send (args[2]: 4 64, args[4]: 4 84 0 0 64)
|
||||
3 ip:::receive (args[2]: 4 64, args[4]: 4 84 0 0 64)
|
||||
3 ip:::receive (args[2]: 4 64, args[4]: 4 84 0 0 64)
|
||||
|
@ -55,12 +55,13 @@ else
|
||||
removeinet6=0
|
||||
fi
|
||||
|
||||
$dtrace -c "/sbin/ping -A inet6 $local 3" -qs /dev/stdin <<EOF | sort -n
|
||||
$dtrace -c "/sbin/ping6 -q -c 1 -X 3 $local" -qs /dev/stdin <<EOF | sort -n | \
|
||||
grep -v -e '^round-trip ' -e '^--- '
|
||||
ip:::send
|
||||
/args[2]->ip_saddr == "$local" && args[2]->ip_daddr == "$local" &&
|
||||
args[5]->ipv6_nexthdr == IPPROTO_ICMPV6/
|
||||
{
|
||||
printf("1 ip:::send (");
|
||||
printf("2 ip:::send (");
|
||||
printf("args[2]: %d %d, ", args[2]->ip_ver, args[2]->ip_plength);
|
||||
printf("args[5]: %d %d %d)\n",
|
||||
args[5]->ipv6_ver, args[5]->ipv6_tclass, args[5]->ipv6_plen);
|
||||
@ -70,7 +71,7 @@ ip:::receive
|
||||
/args[2]->ip_saddr == "$local" && args[2]->ip_daddr == "$local" &&
|
||||
args[5]->ipv6_nexthdr == IPPROTO_ICMPV6/
|
||||
{
|
||||
printf("2 ip:::receive (");
|
||||
printf("3 ip:::receive (");
|
||||
printf("args[2]: %d %d, ", args[2]->ip_ver, args[2]->ip_plength);
|
||||
printf("args[5]: %d %d %d)\n",
|
||||
args[5]->ipv6_ver, args[5]->ipv6_tclass, args[5]->ipv6_plen);
|
||||
|
@ -1,6 +1,8 @@
|
||||
|
||||
::1 is alive
|
||||
1 ip:::send (args[2]: 6 64, args[5]: 6 0 64)
|
||||
1 ip:::send (args[2]: 6 64, args[5]: 6 0 64)
|
||||
2 ip:::receive (args[2]: 6 64, args[5]: 6 0 64)
|
||||
2 ip:::receive (args[2]: 6 64, args[5]: 6 0 64)
|
||||
|
||||
PING6(56=40+8+8 bytes) ::1 --> ::1
|
||||
1 packets transmitted, 1 packets received, 0.0% packet loss
|
||||
2 ip:::send (args[2]: 6 16, args[5]: 6 0 16)
|
||||
2 ip:::send (args[2]: 6 16, args[5]: 6 0 16)
|
||||
3 ip:::receive (args[2]: 6 16, args[5]: 6 0 16)
|
||||
3 ip:::receive (args[2]: 6 16, args[5]: 6 0 16)
|
||||
|
Loading…
Reference in New Issue
Block a user