Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 522566 - sys-apps/net-tools-1.60_p20130513023548-r1: lots of untracked patches
Summary: sys-apps/net-tools-1.60_p20130513023548-r1: lots of untracked patches
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-11 07:59 UTC by SpanKY
Modified: 2014-10-20 11:31 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description SpanKY gentoo-dev 2014-09-11 07:59:41 UTC
net-tools-1.60_p20130513023548-r1 was added with a lot of Fedora patches but no real details or bug open on the topic.  i've specifically whittled down the net-tool patchset to nothing (ignoring the single legacy patch for USE=old-output which is being killed) by getting things merged into upstream.

in other words, no patch at all should be added to net-tools since things are pushed directly upstream, and a new snapshot is rolled.  so what are these patches and why should we keep them ?  i'm inclined to just do a new snapshot and drop them entirely.
Comment 1 Joshua Kinard gentoo-dev 2014-09-11 09:19:26 UTC
It appears Fedora has created several patches to resolve various issues that upstream has not fixed.  I don't know if Fedora ever pushed the patches themselves upstream, as tracking down info on the patches and their history via Google is difficult.  I did look through the Debian patchset as well, but I cannot tell if they're using the same patches or have even addressed the same problems.

Bug #483058 is the only one I could find in our bugzilla for one of the issues addressed by the Fedora patches.  It basically highlighted that the netstat SCTP parsing code couldn't handle IPv6 addresses in /proc.  This led to the following output:

netstat -anSp:
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address  Foreign Address   State   PID/Program name
sctp       0      0 0.0.0.0:22     0.0.0.0:*         LISTEN  18500/sshd
SCTP error in line: 2
      Bug ^^^^^^

After applying "net-tools-sctp-statistics.patch" from Fedora:
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address  Foreign Address   State   PID/Program name
sctp                0.0.0.0:22                       LISTEN  18500/sshd
sctp                :::22                            LISTEN  18500/sshd


There was also a bug in the IPX address output, fixed by "net-tools-ipx.patch":

Before:
Active IPX sockets
Proto Recv-Q Send-Q Local Address    Foreign Address            State
IPX        0      0 01000000:0540    -
IPX        0      0 01000000:0440    -
IPX        0      0 01000000:0340    3E01A8C0:000000000001:5104 ESTAB
                                     ^^^^^^^^

After:
Active IPX sockets
Proto Recv-Q Send-Q Local Address    Foreign Address            State
IPX        0      0 00000001:0540    -
IPX        0      0 00000001:0440    -
IPX        0      0 00000001:0340    C0A8013E:000000000001:5104 ESTAB
                                     ^^^^^^^^


The remainder of the patches, Fedora doesn't list anything detailed, so this is what's in the spec file in their SRPM:

- net-tools-cycle.patch: adds <delay> option that allows netstat to cycle printing through statistics every delay seconds.

- net-tools-man.patch: various man page fixes merged into one patch

- net-tools-interface.patch: netstat: interface option now works as described in the man page (#61113, #115987)

- net-tools-duplicate-tcp.patch: filter out duplicate tcp entries (#139407)

- net-tools-statalias.patch: don't report statistics for virtual devices (#143981)

- net-tools-interface_stack.patch: clear static buffers in interface.c by Ulrich Drepper (#176714)

- net-tools-ifconfig-long-iface-crasher.patch: ifconfig crash when interface name is too long (#190703)

- net-tools-sctp-quiet.patch: make sctp quiet on systems without sctp (#1063906)


If these are already in upstream, then yeah, roll a new snapshot and kill them off.  I found the SourceForge site for net-tools, but the last release there is from 2011, so I have no idea where upstream hides its code at.  If upstream doesn't have them, then they probably need to be sent to them.  Might want to look into the Debian patchset first, though, in case they've fixed something that Fedora hasn't fixed.
Comment 2 SpanKY gentoo-dev 2014-09-12 07:57:04 UTC
i have no doubt the various distros wrote each patch for a reason.  but if no one is reporting a problem on our side, then i don't want to carry a patch.  if someone is reporting a problem on our side, then we should be looking at getting it fixed in upstream and then pulling back the new shapshot.

i'll roll a new snapshot and drop all the Fedora patches, and you can verify the various bugs don't exist anymore.  if they do, then file a specific bug for the issue.

wrt bug 483058, i couldn't really figure out how to set up a system that reproduced the problem, so it wasn't going anywhere.  but i don't want to blindly include patches from other distros either.
Comment 3 SpanKY gentoo-dev 2014-09-12 07:59:16 UTC
also, they aren't really hiding their source ... it's in the sf project you already found.  i'm rolling snapshots from their git, not using their last release.  the 1.60 has a 2011 datestamp only because that's when they moved from the old berlios site, not because that's when the 1.60 release was made.  it goes back way further than that.
Comment 4 Joshua Kinard gentoo-dev 2014-09-13 07:32:22 UTC
(In reply to SpanKY from comment #3)
> also, they aren't really hiding their source ... it's in the sf project you
> already found.  i'm rolling snapshots from their git, not using their last
> release.  the 1.60 has a 2011 datestamp only because that's when they moved
> from the old berlios site, not because that's when the 1.60 release was
> made.  it goes back way further than that.

What's the best way to contact upstream?  Probably best I handle getting the SCTP/IPX fixes included since I have the ability to test them.
Comment 5 SpanKY gentoo-dev 2014-10-18 23:53:10 UTC
(In reply to Joshua Kinard from comment #4)

use the mailing list that's in their sf page:
http://sourceforge.net/p/net-tools/mailman/
Comment 6 SpanKY gentoo-dev 2014-10-19 04:01:24 UTC
net-tools-cycle.patch: adds repeat output to netstat; use `watch` instead

net-tools-man.patch: add "this is deprecated" notices to man pages; not needed

net-tools-interface.patch: adds table output to netstat

net-tools-ifconfig-long-iface-crasher.patch: this protects against interface names that are larger than IFNAMSIZ-1, but the kernel itself prevents that, so i can't see this being a problem in real life.

net-tools-interface_stack.patch: i can't figure out what this does.  it seems to move from fgets() to getline() in case the proc lines it parses are extremely long.  i'm not sure where that ever comes up.  at the very extreme, it seems like each line will still be less than the current buffer sizes.  real world examples would be helpful here.

net-tools-netstat-probe.patch: support decoding of timer=4 with the tcp proc format.  i've merged this upstream.

net-tools-statalias.patch: this fixes an edge case with marking stats as valid.  i've merged this upstream.

net-tools-duplicate-tcp.patch: can't read upstream bug report

net-tools-ipx.patch: probably should get merged.  i'd have to test locally.

net-tools-sctp-quiet.patch: looks reasonable.  i've merged this upstream.

net-tools-sctp-statistics.patch: i'm guessing this is bug 483058.  this needs to be cleaned up and sent upstream.
Comment 7 SpanKY gentoo-dev 2014-10-19 04:21:45 UTC
(In reply to SpanKY from comment #6)

ugh, net-tools-statalias.patch is actually a fix for one of their own patches.  so it doesn't make sense in upstream (nor does it really make sense being a sep patch, but that's Fedora's issue).
Comment 9 Joshua Kinard gentoo-dev 2014-10-19 04:45:30 UTC
(In reply to SpanKY from comment #6)
> net-tools-netstat-probe.patch: support decoding of timer=4 with the tcp proc
> format.  i've merged this upstream.

Oh, you have upstream commit access?


> net-tools-ipx.patch: probably should get merged.  i'd have to test locally.

I tested this with a NetWare 4.2 install I have in a VM, with my dev box mounting the remote NCP share over IPX.  If you pursue this, you'll need to get MS-DOS installed and working first (which can be a fun exercise in a VM...), then install NW42 on top of that.

I don't know if it could be replicated with just the kernel's IPX module loaded and configured.  I figured, easier to test with the real thing.


> net-tools-sctp-statistics.patch: i'm guessing this is bug 483058.  this
> needs to be cleaned up and sent upstream.

That did fix bug 483058.  Not a lot of info on why it doesn't put '0' in the Recv-Q or Send-Q fields, and leaves the foreign address field blank if in the local range (0.0.0.0/8 or ::).  Possibly has to do with the fact that SCTP supports multi-homing at the protocol level, so a single IP::Port pair doesn't uniquely present a single connection, like in TCP/UDP/DCCP.

I can find the commit e-mail and the Fedora bug (#982638#c10), but I can't access the bug because it appears to be locked from public viewing.