Bug 176465
| Summary: | IPv6: 'netstat -A inet6 -n' truncates most global IPv6 addresses | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 4 | Reporter: | Steve Bonneville <sbonnevi> | ||||
| Component: | net-tools | Assignee: | Radek Vokál <rvokal> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Ben Levenson <benl> | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 4.0 | ||||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | RHBA-2006-0360 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2006-08-10 21:17:58 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 181409 | ||||||
| Attachments: |
|
||||||
|
Description
Steve Bonneville
2005-12-23 04:22:55 UTC
Adding to proposed list. This will break the "pseudo-tabular" style of the output. Created attachment 124482 [details]
net-tools-1.60-nestat_stop_trim.patch
Proposed patch
A similar change was made to /bin/ls to support user/group names longer than eight characters some time ago that was designed not to break the pseudo-tabular output of ls. Instead, if a large-sized username or groupname field is needed it widens that column of the output throughout. I haven't looked at how that was implemented, though, and I expect it's a more complicated solution. Ok, should we agree on some solution? My personal favourite one is new option. I've introduced -T (--trim) option in rawhide net-tools, which stops the trimming on demand. Than there is my patch in comment #2 , quick fix which is rather ugly one and than you propose the two line output, which I think is nice, but not parseable. So are there any complains about adding new option? This issue is on Red Hat Engineering's list of planned work items for the upcoming Red Hat Enterprise Linux 4.4 release. Engineering resources have been assigned and barring unforeseen circumstances, Red Hat intends to include this item in the 4.4 release. I'm not sure what you mean by my proposal of "two-line output". All I was proposing was that we'd do something like /bin/ls does for the -l option; for example, compare the size of the username field for 'ls -l /etc' (6 chars on my RHEL4U3 system, longest username is 'amanda') with 'ls -l /usr/bin' (4 chars on my RHEL4U3 system, longest username is 'root'). Yes, we lose the fixed-field-size assumption, which is unfortunate but survivable. Yes, the coding is probably more complicated, since we need to know the size of the longest string before we start displaying output. But parsing this output isn't horrific or that different from what already works, and this has some advantages: 1) We can still parse fields by looking for whitespace; awk is good at this, for one example. 2) We still know that one line is one piece of information, since we don't have a newline until the end of the row; really long lines display wrapped on narrow terminals. This already happens, though, since the default width seems to require at least 87 characters, even without netstat -e. 3) We could set a minimum field size which is the same as the current fixed size for each column, and only expand as necessary. 4) We can still have an option to enable/disable the trimming/expanding behavior based on whatever seems to make the most sense. 5) We get to keep something that looks like the current tabular output, where the columns stay lined up even with trimming stopped. I do like the idea of an option to control this behavior, so we don't break existing scripts that may make fixed-field assumptions. On the other hand, I'd just be happy to see some way for us to display this information properly, even if it isn't the most elegant solution or even a final solution. :) Thanks for your work on this. Ok, I will stick with new option (--trim) which just stops trimming, but doesn't present the data in tabular output. Your solution would be nicer but .. maybe I'll do this for FC6 :) An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2006-0360.html |