alpha net-yy test failures due to port decode errors
Mike Frysinger
vapier at gentoo.org
Mon Mar 2 19:32:53 UTC 2015
On 03 Mar 2015 02:56, Masatake YAMATO wrote:
> On Mon, 2 Mar 2015 04:48:13 -0500, Mike Frysinger <vapier at gentoo.org> wrote:
> > --- a/socketutils.c
> > +++ b/socketutils.c
> > @@ -64,7 +64,7 @@ inet_parse_response(const char *proto_name, const void *data, int data_len,
> > const unsigned long inode)
> > {
> > const struct inet_diag_msg *diag_msg = data;
> > - static const char zero_addr[sizeof(struct in6_addr)];
> > + static const char zero_addr[sizeof(struct in6_addr) + 20];
> > socklen_t addr_size, text_size;
> >
> > if (diag_msg->idiag_inode != inode)
>
>
> Thank you. but I just wonder why this has effects on the result.
>
> Could you try the patch and run tests on alpha?
done. the first run is with the +20 hack while the second is w/out.
TCP:[127.0.0.1:44261->127.0.0.1:41995]
0000: 02 01 00 00 ac e5 a4 0b | 7f 00 00 01 00 00 00 00
0010: 00 00 00 00 00 00 00 00 | 7f 00 00 01 00 00 00 00
0020: 00 00 00 00 00 00 00 00 | 00 00 00 00 00 b6 dc f6
0030: 00 fc ff ff 00 00 00 00 | 00 00 00 00 00 00 00 00
0040: ed 03 00 00 53 b8 80 05 |
TCP:[127.0.0.1:39667->127.0.0.1:60672]
0000: 02 01 00 00 9a f3 ed 8e | 7f 00 00 01 00 00 00 00
0010: 00 00 00 00 00 00 00 00 | 7f 00 00 01 00 00 00 00
0020: 00 00 00 00 00 00 00 00 | 00 00 00 00 80 de dc f6
0030: 00 fc ff ff 00 00 00 00 | 00 00 00 00 00 00 00 00
0040: ed 03 00 00 9c ab 80 05 |
> If ss command, which is part of iproute2, is available on the alpha system,
>
> % ss -n -t -p
> State Recv-Q Send-Q Local Address:Port Peer Address:Port
> ESTAB 0 0 10.64.244.96:49945 10.64.255.1:631 users:(("gnome-settings-",pid=4724,fd=21))
> ESTAB 0 0 192.168.11.12:42019 96.43.148.82:443 users:(("firefox",pid=6415,fd=40))
> CLOSE-WAIT 1 0 192.168.11.12:58661 152.19.134.142:443
>
> Older ss just opens /proc/net/tcp and read it.
> Newer ss uses netlink socket to get tcp socket informaton as strace -yy does.
>
> You can detect newer or older with "/usr/bin/strace -e open ss -t".
> Older implentation may open /proc/net/tcp. Newer one may not.
`ss -nat` and `netstat -nat` match. ss is using netlink here:
$ strace -eopen,socket ss -nat
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/lib/libc.so.6.1", O_RDONLY|O_CLOEXEC) = 3
open("/proc/slabinfo", O_RDONLY) = 3
socket(PF_NETLINK, SOCK_RAW|SOCK_CLOEXEC, NETLINK_SOCK_DIAG) = 3
...
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20150302/0644cb0c/attachment.bin>
More information about the Strace-devel
mailing list