missing sin6_addr label in connect system call on ipv6 socket

Masatake YAMATO yamato at redhat.com
Mon May 17 02:32:01 UTC 2010


Hi,


It seems that `sin6_addr' label in connect system call on ipv6 socket is missed. 

e.g.

27553 connect(35, {sa_family=AF_INET6, sin6_port=htons(58815), inet_pton(AF_INET6, "::1", &sin6_addr), ...
--------------------------------------------------------------^

With following patch the output is changed to 

27553 connect(35, {sa_family=AF_INET6, sin6_port=htons(58815), sin6_addr=inet_pton(AF_INET6, "::1", &sin6_addr), ...


Could you apply the patch if appreciated?


diff --git a/net.c b/net.c
index f56664e..d0bde3e 100644
--- a/net.c
+++ b/net.c
@@ -1044,7 +1044,7 @@ printsock(struct tcb *tcp, long addr, int addrlen)
 #ifdef HAVE_INET_NTOP
 	case AF_INET6:
 		inet_ntop(AF_INET6, &addrbuf.sa6.sin6_addr, string_addr, sizeof(string_addr));
-		tprintf("sin6_port=htons(%u), inet_pton(AF_INET6, \"%s\", &sin6_addr), sin6_flowinfo=%u",
+		tprintf("sin6_port=htons(%u), sin6_addr=inet_pton(AF_INET6, \"%s\", &sin6_addr), sin6_flowinfo=%u",
 				ntohs(addrbuf.sa6.sin6_port), string_addr,
 				addrbuf.sa6.sin6_flowinfo);
 #ifdef HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID



Masatake YAMATO




More information about the Strace-devel mailing list