From: Phil Sutter <phil@nwl.cc> Date: 2017-10-16 10:33:24
Hi,
On Fri, Oct 13, 2017 at 09:57:37AM +0000, Humberto Alves wrote:
Hi! With the last iproute2 release, ss command output does not
differentiate between any-address IPv4 sockets from the IPv6 ones.
I don't know if this is an expected behaviour, but the old output looks
more useful. Below I pasted the difference between the old behaviour and
the new one.
Although the change is certainly intentional (it was introduced by
Stephen Hemminger as a side effect of aba9c23a6e1cb ("ss: enclose IPv6
address in brackets"), I second reverting to the old display of
in6addr_any as '::'.
I am happy to send a patch if you want. Thanks
It should be enough to just getting rid of the
| if (!memcmp(a->data, &in6addr_any, sizeof(in6addr_any))) {
case in inet_addr_print(). The else-case which calls format_host()
should deal with in6addr_any just fine. This way the address also gets
enclosed in brackets which helps separating it from the ':port' part.
Cheers, Phil
IMHO that's not ugly.
How is that a feature? Differentiating IPv4 from IPv6 sockets is a
feature to me!
If you want to use '*' in IPv4 and IPv6, add another column please.
Thank you
On 10/16/2017 05:20 PM, Stephen Hemminger wrote:
On Fri, 13 Oct 2017 09:57:37 +0000
Humberto Alves [off-list ref] wrote:
quoted
Hi! With the last iproute2 release, ss command output does not
differentiate between any-address IPv4 sockets from the IPv6 ones.
I don't know if this is an expected behaviour, but the old output looks
more useful. Below I pasted the difference between the old behaviour and
the new one.
I am happy to send a patch if you want. Thanks
iproute2-4.12
-------------
$ ss --version
ss utility, iproute2-ss170705
$ ss -ntl
State Recv-Q Send-Q Local Address:Port Peer
Address:Port
LISTEN 0 100 *:587 *:*
LISTEN 0 100 *:110 *:*
LISTEN 0 100 *:143 *:*
LISTEN 0 128 *:80 *:*
LISTEN 0 128 *:2225 *:*
LISTEN 0 10 127.0.0.1:5010 *:*
LISTEN 0 128 *:20 *:*
LISTEN 0 128 127.0.0.1:20150 *:*
LISTEN 0 128 *:61719 *:*
LISTEN 0 100 *:25 *:*
LISTEN 0 3 *:1723 *:*
LISTEN 0 128 *:17500 *:*
LISTEN 0 128 127.0.0.1:17600 *:*
LISTEN 0 128 *:8000 *:*
LISTEN 0 100 *:993 *:*
LISTEN 0 128 127.0.0.1:17603 *:*
LISTEN 0 100 *:995 *:*
LISTEN 0 100 :::587 :::*
LISTEN 0 100 :::110 :::*
LISTEN 0 100 :::143 :::*
LISTEN 0 128 :::22000 :::*
LISTEN 0 128 :::80 :::*
LISTEN 0 128 :::2225 :::*
LISTEN 0 128 :::20 :::*
LISTEN 0 128 ::1:20150 :::*
LISTEN 0 100 :::25 :::*
LISTEN 0 128 :::17500 :::*
LISTEN 0 128 :::8384 :::*
LISTEN 0 100 :::993 :::*
LISTEN 0 100 :::995 :::*
iproute2-4.13
-------------
$ ss --version
ss utility, iproute2-ss170905
$ ss -ntl
State Recv-Q Send-Q Local Address:Port Peer
Address:Port
LISTEN 0 100 *:587 *:*
LISTEN 0 100 *:110 *:*
LISTEN 0 100 *:143 *:*
LISTEN 0 128 *:80 *:*
LISTEN 0 128 *:2225 *:*
LISTEN 0 10 127.0.0.1:5010 *:*
LISTEN 0 128 *:20 *:*
LISTEN 0 128 127.0.0.1:20150 *:*
LISTEN 0 128 *:61719 *:*
LISTEN 0 100 *:25 *:*
LISTEN 0 3 *:1723 *:*
LISTEN 0 128 *:17500 *:*
LISTEN 0 128 127.0.0.1:17600 *:*
LISTEN 0 128 *:8000 *:*
LISTEN 0 100 *:993 *:*
LISTEN 0 128 127.0.0.1:17603 *:*
LISTEN 0 100 *:995 *:*
LISTEN 0 100 *:587 *:*
LISTEN 0 100 *:110 *:*
LISTEN 0 100 *:143 *:*
LISTEN 0 128 *:22000 *:*
LISTEN 0 128 *:80 *:*
LISTEN 0 128 *:2225 *:*
LISTEN 0 128 *:20 *:*
LISTEN 0 128 [::1]:20150 *:*
LISTEN 0 100 *:25 *:*
LISTEN 0 128 *:17500 *:*
LISTEN 0 128 *:8384 *:*
LISTEN 0 100 *:993 *:*
LISTEN 0 100 *:995 *:*
All changes are not regressions.
Yes it was intentional because the outputing [::]:20 looked ugly and using * makes IPv4 and IPv6
look the same.
Yes, just get rid of this 'if statement'.
in6addr_any should be represented as '::', not '*'. Otherwise it's
impossible to distinguish IPv4 listening addresses from IPv6. Thank you :)
On 10/16/2017 11:33 AM, Phil Sutter wrote:
Hi,
On Fri, Oct 13, 2017 at 09:57:37AM +0000, Humberto Alves wrote:
quoted
Hi! With the last iproute2 release, ss command output does not
differentiate between any-address IPv4 sockets from the IPv6 ones.
I don't know if this is an expected behaviour, but the old output looks
more useful. Below I pasted the difference between the old behaviour and
the new one.
Although the change is certainly intentional (it was introduced by
Stephen Hemminger as a side effect of aba9c23a6e1cb ("ss: enclose IPv6
address in brackets"), I second reverting to the old display of
in6addr_any as '::'.
quoted
I am happy to send a patch if you want. Thanks
It should be enough to just getting rid of the
| if (!memcmp(a->data, &in6addr_any, sizeof(in6addr_any))) {
case in inet_addr_print(). The else-case which calls format_host()
should deal with in6addr_any just fine. This way the address also gets
enclosed in brackets which helps separating it from the ':port' part.
Cheers, Phil
From: Stephen Hemminger <stephen@networkplumber.org> Date: 2017-10-16 21:28:10
On Mon, 16 Oct 2017 20:44:07 +0000
Humberto Alves [off-list ref] wrote:
Yes, just get rid of this 'if statement'.
in6addr_any should be represented as '::', not '*'. Otherwise it's
impossible to distinguish IPv4 listening addresses from IPv6. Thank you :)
From: Eric Dumazet <hidden> Date: 2017-10-17 02:00:39
On Mon, 2017-10-16 at 14:28 -0700, Stephen Hemminger wrote:
On Mon, 16 Oct 2017 20:44:07 +0000
Humberto Alves [off-list ref] wrote:
quoted
Yes, just get rid of this 'if statement'.
in6addr_any should be represented as '::', not '*'. Otherwise it's
impossible to distinguish IPv4 listening addresses from IPv6. Thank you :)
But IPv6 accepts IPv4 as well.
Not always (IPV6_V6ONLY socket option)
I agree that this recent change in ss is problematic.
Please give us back a way to distinguish IPV6 and IPv4