Bug 1588122
| Summary: | ss(1) doesn't put IPv6 addresses into square brackets (e.g. RFC 4038) | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Robert Scheck <redhat-bugzilla> |
| Component: | iproute | Assignee: | Andrea Claudi <aclaudi> |
| Status: | CLOSED ERRATA | QA Contact: | Jaroslav Aster <jaster> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.5 | CC: | aclaudi, atragler, jaster, jeharris, jmaxwell, jomurphy, psutter, redhat-bugzilla, robert.scheck |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | iproute-4.11.0-24.el7 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-08-06 12:54:26 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
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 RHEL 7.7 would be fine, RHEL 7.6 z-stream would be really great (however not strictly necessary). 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).