Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
ss(1) doesn't put IPv6 addresses into square brackets (follwoing e.g.
RFC 4038), thus it looks like this:
[root@tux ~]# ss -lpen | grep sshd
tcp LISTEN 0 128 *:22 *:* users:(("sshd",pid=1409,fd=3)) ino:26091 sk:ffff8ee040ed0000 <->
tcp LISTEN 0 128 :::22 :::* users:(("sshd",pid=1409,fd=4)) ino:26093 sk:ffff8ee046628000 v6only:1 <->
[root@tux ~]#
However, :::22 is not a valid IPv6 address and just a colon is a bad way
to separate the IPv6 address from the port. This is why e.g. RFC 4038 has
suggestions to put the IPv6 into square brackets, thus [::]:22. For URIs
this is even explicitly specified e.g. in RFC 2732.
In order to achieve a consistent and clear way to distinguish between IPv6
address and port, I would like to see square brackets as well in ss(1).
Don't forget link-local addresses: [fe80::abc:def:abc:def%enp0s31f6]:123
Version-Release number of selected component (if applicable):
iproute-4.11.0-14.el7.x86_64
How reproducible:
Everytime, see above.
Actual results:
ss(1) doesn't put IPv6 addresses into square brackets (e.g. RFC 4038).
Expected results:
ss(1) puts IPv6 addresses into square brackets (e.g. RFC 4038).
Phil, please clone this bug especially for RHEL 8, given I assume that
this won't be changed for compatibility reasons for RHEL 7, but then we
should start better with RHEL 8.
Cross-filed ticket 02115142 at the Red Hat customer portal.
Upstream code already does put numeric IPv6 addresses in brackets, so a backport
would suffice:
git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2.git
commit aba9c23a6e1cb134840c998df14888dca469a485
Author: Stephen Hemminger <stephen>
Date: Fri Aug 4 12:02:41 2017 -0700
ss: enclose IPv6 address in brackets
Based on patch by Lehner Florian <dev>
Adds support for RFC2732 IPv6 address format with brackets.
Signed-off-by: Stephen Hemminger <stephen>
Hi,
Backporting the requested change shouldn't require much effort. I'm moving this ticket to target RHEL7.7 though, since it's too late for 7.6 y-stream.
Is backporting to RHEL7.5 explicitly required? If so, I guess backporting to both 7.5 and 7.6 z-streams would be needed.
Due to package rebase, requirements are already fulfilled in RHEL8, BTW.
Cheers, Phil
Hi Robert,
(In reply to Robert Scheck from comment #6)
> RHEL 7.7 would be fine, RHEL 7.6 z-stream would be really great (however
> not strictly necessary).
Thanks for your quick feedback. Since there doesn't seem to be an urgent need to get the feature into older RHEL7 releases, I'll limit effort to RHEL7.7 then.
Thanks, Phil
An unintended effect of the commit resolving this issue was discovered during testing. Socket previously identified as :::111 are now showed as *:111 and not, as expected, as [::]:111.
This is consistent with the behaviour of newer iproute versions (included in RHEL 8) but not with the one of previous RHEL 7 versions.
Reopening to fix this and be consistent with previous RHEL 7 versions.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHEA-2019:2131
Description of problem: ss(1) doesn't put IPv6 addresses into square brackets (follwoing e.g. RFC 4038), thus it looks like this: [root@tux ~]# ss -lpen | grep sshd tcp LISTEN 0 128 *:22 *:* users:(("sshd",pid=1409,fd=3)) ino:26091 sk:ffff8ee040ed0000 <-> tcp LISTEN 0 128 :::22 :::* users:(("sshd",pid=1409,fd=4)) ino:26093 sk:ffff8ee046628000 v6only:1 <-> [root@tux ~]# However, :::22 is not a valid IPv6 address and just a colon is a bad way to separate the IPv6 address from the port. This is why e.g. RFC 4038 has suggestions to put the IPv6 into square brackets, thus [::]:22. For URIs this is even explicitly specified e.g. in RFC 2732. In order to achieve a consistent and clear way to distinguish between IPv6 address and port, I would like to see square brackets as well in ss(1). Don't forget link-local addresses: [fe80::abc:def:abc:def%enp0s31f6]:123 Version-Release number of selected component (if applicable): iproute-4.11.0-14.el7.x86_64 How reproducible: Everytime, see above. Actual results: ss(1) doesn't put IPv6 addresses into square brackets (e.g. RFC 4038). Expected results: ss(1) puts IPv6 addresses into square brackets (e.g. RFC 4038).