Bug#508110: netstat: uninitialized sin6_scope_id leads to wrong output

Marco Steinacher msteinacher at websource.ch
Mon Jul 5 18:18:37 UTC 2010


Hi,

I noticed that problem as well and I think it's a bug. The fields
'sin6_scope_id' and 'sin6_flowinfo' of the sockaddr_in6 structure are
not initialized (e.g. for remaddr in netstat.c:tcp_do_one()). Therefore
 getnameinfo() returns '<address>%<scope>' with an arbitrary <scope> for
addresses that can't be resolved.

I suggest to apply the attached patch against net-tools-1.60/lib/inet6.c
to fix the problem.

Marco
-- 
OpenPGP Key ID: 0x62937F7F
-------------- next part --------------
A non-text attachment was scrubbed...
Name: net-tools-sin6_scope_id.patch
Type: text/x-patch
Size: 578 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-net-tools-maintainers/attachments/20100705/0ab5b5f8/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 552 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-net-tools-maintainers/attachments/20100705/0ab5b5f8/attachment.pgp>


More information about the Pkg-net-tools-maintainers mailing list