On Mon, Mar 02, 2015 at 02:32:53PM -0500, Mike Frysinger wrote:
> On 03 Mar 2015 02:56, Masatake YAMATO wrote:
> > On Mon, 2 Mar 2015 04:48:13 -0500, Mike Frysinger <vap...@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 | 

In other words, the whole diag_msg struct is ok, diag_msg->id.idiag_sport
is ok, but diag_msg->id.idiag_dport is NOT ok.

Could you try this patch, please?

--- a/socketutils.c
+++ b/socketutils.c
@@ -114,7 +114,7 @@ receive_responses(const int fd, const unsigned long inode,
                  const char *proto_name,
                  bool (* parser) (const char *, const void *, int, const 
unsigned long))
 {
-       static char buf[8192];
+       static long buf[8192 / sizeof(long)];
        struct sockaddr_nl nladdr = {
                .nl_family = AF_NETLINK
        };

If it doesn't help, I'd like to compare diag_msg, &diag_msg->id,
&diag_msg->id.idiag_sport, and &diag_msg->id.idiag_dport
with and without +20 hack.


-- 
ldv

Attachment: pgpuWXinG0juB.pgp
Description: PGP signature

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to