]> git.proxmox.com Git - mirror_iproute2.git/commit
ss: Distinguish between IPv4 and IPv6 wildcard sockets
authorPhil Sutter <phil@nwl.cc>
Wed, 18 Oct 2017 17:58:13 +0000 (19:58 +0200)
committerStephen Hemminger <sthemmin@microsoft.com>
Sat, 21 Oct 2017 12:59:29 +0000 (14:59 +0200)
commit1267c0b924de0297510efd48f8f849af774be369
treeb50bd81111156db5a564e02570c3b0a122f04280
parent4b4dde0ae6bed45192a1056c57ef87dc2a31d2c1
ss: Distinguish between IPv4 and IPv6 wildcard sockets

Commit aba9c23a6e1cb ("ss: enclose IPv6 address in brackets") unified
display of wildcard sockets in IPv4 and IPv6 to print the unspecified
address as '*'. Users then complained that they can't distinguish
between address families anymore, so change this again to what Stephen
Hemminger suggested:

| *:80    << both IPV6 and IPV4
| [::]:80 << IPV6_ONLY
| 0.0.0.0:80  << IPV4_ONLY

Note that on older kernels which don't support INET_DIAG_SKV6ONLY
attribute, pure IPv6 sockets will still show as '*'.

Cc: Humberto Alves <hjalves@live.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Phil Sutter <phil@nwl.cc>
misc/ss.c