]> granicus.if.org Git - strace/commit
net.c: do not print sockaddr_in6.sin6_scope_id unnecessarily
authorDmitry V. Levin <ldv@altlinux.org>
Thu, 23 Jun 2016 09:32:24 +0000 (09:32 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 23 Jun 2016 09:32:24 +0000 (09:32 +0000)
commitc6fd08c6edf7cd5747f13cc411bae6396da4a81c
treed0def2b24a496f17ca53df9e11571fd9f9facdf5
parentdcc7a3c1c68455bffe16b5c4cd32ea1b92a5a4d1
net.c: do not print sockaddr_in6.sin6_scope_id unnecessarily

Prior to RFC2553, struct sockaddr_in6 had no sin6_scope_id field.
As the kernel still accepts RFC2133 editions of struct sockaddr_in6,
print sockaddr_in6.sin6_scope_id only when it is specified.

* net.c (SIN6_MIN_LEN): New macro.
(print_sockaddr_data_in6): Print sockaddr_in6.sin6_scope_id only when
socket address length exceeds SIN6_MIN_LEN.
net.c