summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Mustacchi <rm@fingolfin.org>2022-10-22 21:17:57 +0000
committerRobert Mustacchi <rm@fingolfin.org>2022-11-09 17:43:53 +0000
commitf651720770e11ade275c4fc451e6b00c9e5d3068 (patch)
treee402d9394fed420bbf7ceb5fb99716b594648a5b
parent17425aa5357a01155862de9af35ff553bab2bb86 (diff)
downloadillumos-joyent-f651720770e11ade275c4fc451e6b00c9e5d3068.tar.gz
15126 ipv4info_t translator produces bad flags value
15113 dtrace ICMPv4 tests fail due to flags mismatch Reviewed by: Toomas Soome <tsoome@me.com> Reviewed by: Ryan Zezeski <ryan@oxide.computer> Approved by: Richard Lowe <richlowe@richlowe.net>
-rwxr-xr-xusr/src/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh3
-rw-r--r--usr/src/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh.out8
-rwxr-xr-xusr/src/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteicmp.ksh3
-rw-r--r--usr/src/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteicmp.ksh.out4
-rw-r--r--usr/src/lib/libdtrace/common/ip.d.in4
5 files changed, 10 insertions, 12 deletions
diff --git a/usr/src/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh b/usr/src/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh
index 0965040e62..d95a00c48a 100755
--- a/usr/src/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh
+++ b/usr/src/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh
@@ -24,7 +24,6 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#pragma ident "%Z%%M% %I% %E% SMI"
#
# Test ip:::{send,receive} of IPv4 ICMP to a local address.
@@ -45,7 +44,7 @@ fi
dtrace=$1
local=127.0.0.1
-$dtrace -c "/usr/sbin/ping $local 3" -qs /dev/stdin <<EOF | sort -n
+$dtrace -c "/usr/sbin/ping -D $local 3" -qs /dev/stdin <<EOF | sort -n
ip:::send
/args[2]->ip_saddr == "$local" && args[2]->ip_daddr == "$local" &&
args[4]->ipv4_protocol == IPPROTO_ICMP/
diff --git a/usr/src/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh.out b/usr/src/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh.out
index 41d6e0c8ad..ce028a4c86 100644
--- a/usr/src/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh.out
+++ b/usr/src/cmd/dtrace/test/tst/common/ip/tst.ipv4localicmp.ksh.out
@@ -1,6 +1,6 @@
-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)
+1 ip:::send (args[2]: 4 64, args[4]: 4 84 2 0 255)
+1 ip:::send (args[2]: 4 64, args[4]: 4 84 2 0 255)
+2 ip:::receive (args[2]: 4 64, args[4]: 4 84 2 0 255)
+2 ip:::receive (args[2]: 4 64, args[4]: 4 84 2 0 255)
127.0.0.1 is alive
diff --git a/usr/src/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteicmp.ksh b/usr/src/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteicmp.ksh
index efe0d30fa9..b2aa601ad2 100755
--- a/usr/src/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteicmp.ksh
+++ b/usr/src/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteicmp.ksh
@@ -24,7 +24,6 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-#pragma ident "%Z%%M% %I% %E% SMI"
#
# Test ip:::{send,receive} of IPv4 ICMP to a remote host.
@@ -55,7 +54,7 @@ if (( $? != 0 )); then
exit 4
fi
-$dtrace -c "/usr/sbin/ping $dest 3" -qs /dev/stdin <<EOF | \
+$dtrace -c "/usr/sbin/ping -D $dest 3" -qs /dev/stdin <<EOF | \
grep -v 'is alive' | sort -n
ip:::send
/args[2]->ip_saddr == "$source" && args[2]->ip_daddr == "$dest" &&
diff --git a/usr/src/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteicmp.ksh.out b/usr/src/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteicmp.ksh.out
index b5915f8db4..a330569d62 100644
--- a/usr/src/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteicmp.ksh.out
+++ b/usr/src/cmd/dtrace/test/tst/common/ip/tst.ipv4remoteicmp.ksh.out
@@ -1,3 +1,3 @@
-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 4 0 255)
+1 ip:::send (args[2]: 4 64, args[4]: 4 84 2 0 255)
+2 ip:::receive (args[2]: 4 64, args[4]: 4 84 2 0 255)
diff --git a/usr/src/lib/libdtrace/common/ip.d.in b/usr/src/lib/libdtrace/common/ip.d.in
index f1e6332529..7dd4d2a314 100644
--- a/usr/src/lib/libdtrace/common/ip.d.in
+++ b/usr/src/lib/libdtrace/common/ip.d.in
@@ -311,9 +311,9 @@ translator ipv4info_t < ipha_t *I > {
ipv4_length = I != NULL ? ntohs(I->ipha_length) : 0;
ipv4_ident = I != NULL ? ntohs(I->ipha_ident) : 0;
ipv4_flags = I != NULL ? ntohs(I->ipha_fragment_offset_and_flags) >>
- 12 : 0;
+ 13 : 0;
ipv4_offset = I != NULL ? ntohs(I->ipha_fragment_offset_and_flags) &
- 0x0fff : 0;
+ 0x1fff : 0;
ipv4_ttl = I != NULL ? I->ipha_ttl : 0;
ipv4_protocol = I != NULL ? I->ipha_protocol : 0;
ipv4_protostr = I == NULL ? "<null>" :