I was using netstat to troubleshoot some issues and got the following output: # netstat -AanL Current listen queue sizes (qlen/incqlen/maxqlen) Tcpcb Proto Listen Local Address fffff8003b86d410 tcp4 0/0/128 192.168.255.37.420 fffff800bddcd000 tcp4 0/0/128 192.168.255.37.420 fffff8015eaf1820 tcp4 0/0/128 *.80 fffff8004d87d000 tcp4 0/0/10 127.0.0.1.25 fffff8004d87d410 tcp4 0/0/128 *.22 fffff8004d87d820 tcp6 0/0/128 *.22 fffff8004d633000 tcp4 0/0/128 192.168.255.37.112 So I wasted hours looking for something on 192.168.255.37:420 when in fact it was just truncated: # netstat -AanLW Current listen queue sizes (qlen/incqlen/maxqlen) Tcpcb Proto Listen Local Address fffff8003b86d410 tcp4 0/0/128 192.168.255.37.4201 fffff800bddcd000 tcp4 0/0/128 192.168.255.37.4200 fffff8015eaf1820 tcp4 0/0/128 *.80 fffff8004d87d000 tcp4 0/0/10 127.0.0.1.25 fffff8004d87d410 tcp4 0/0/128 *.22 fffff8004d87d820 tcp6 0/0/128 *.22 fffff8004d633000 tcp4 0/0/128 192.168.255.37.11211 I can understand truncating a symbolic name, but truncating the port number like that (without any indication it was truncated) is *very* misleading. Same thing I imagine if you truncate an IP address (4 or 6) in a way that makes it look like the truncated data is a valid IP address. Please either a) never truncate numeric addresses and port numbers (-n implies -W) b) indicate when a field is truncated (ex: 192.168.255.37.11* or 192.168.255*.11211)
Does not seem to reproduce on CURRENT, FWIW.
Oh right, my apologies, I forgot to include basic system info # uname -imoprsvUK FreeBSD 11.1-RELEASE-p10 FreeBSD 11.1-RELEASE-p10 #0: Tue May 8 05:21:56 UTC 2018 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 amd64 GENERIC 1101001 1101001 @Conrad, I'd appreciate if you could paste here the output that does not seem to reproduce.
Not sure what you're looking for as far as "not truncated." E.g., $ netstat -AanL Current listen queue sizes (qlen/incqlen/maxqlen) Tcpcb Proto Listen Local Address fffffXXXXXXXXXXX tcp4 0/0/16 *.YYYY fffffXXXXXXXXXXX tcp4 0/0/100 127.0.0.1.YYY fffffXXXXXXXXXXX tcp4 0/0/100 127.0.0.1.YYY fffffXXXXXXXXXXX tcp4 0/0/128 127.0.0.1.YYYY Those YYY port numbers are all intact, not truncated... If the terminal is too narrow to fit, the lines wrap rather than truncating. FreeBSD 13.0-CURRENT #52 r343668+
Ah, well yes, those IP+port numbers are not truncated because their total length is <= 18 chars. The problem would only be visible for addresses long enough to be truncated, as in my example.