Description of problem: Small error in fuser.c from psmisc package, when namespace udp is chosen. The fuser program never gets a list of udp connections from /proc/net/udp - it always parses /proc/net/tcp Version-Release number of selected component (if applicable): psmisc-22.2-6 How reproducible: 100% Steps to Reproduce: 1. Use netstat -unlp to get a list of UDP sockets listening on the host, for example: # netstat -elnup Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name udp 0 0 0.0.0.0:161 0.0.0.0:* 0 9949 3115/snmpd udp 0 0 0.0.0.0:819 0.0.0.0:* 0 8954 2763/rpc.statd udp 0 0 192.168.122.1:53 0.0.0.0:* 0 13044 3660/dnsmasq udp 0 0 0.0.0.0:822 0.0.0.0:* 0 8963 2763/rpc.statd 2.Use fuser to get details of the UDP ports: # fuser -u 161/udp # fuser -u 819/udp # fuser -u 53/udp 53/udp: 3660(nobody) # fuser -u 822/udp Actual results: # fuser -u 161/udp reports no details # fuser -u 819/udp reports no details # fuser -u 53/udp reports no details Expected results: fuser should report the correct details for the UDP socket: # fuser -u 161/udp 161/udp: 3115(root) # fuser -u 819/udp 819/udp: 2763(rpcuser) # fuser -u 53/udp 53/udp: 3660(nobody) # fuser -u 822/udp 822/udp: 2763(rpcuser) Additional info: Patch that corrects the problem attached.
Created attachment 328511 [details] patch that corrects error in fuser.c
This request was evaluated by Red Hat Product Management for inclusion, but this component is not scheduled to be updated in the current Red Hat Enterprise Linux release. If you would like this request to be reviewed for the next minor release, ask your support representative to set the next rhel-x.y flag to "?".
This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unfortunately unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux.
*** Bug 654416 has been marked as a duplicate of this bug. ***
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Cause - Show processes that uses UDP port Consequence - Processes aren't listed due to using TCP table instead of UDP. Fix - UDP listing now uses UDP table instead of TCP Result - Processes that uses UDP are correctly listed
Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1,8 +1 @@ -Cause +Previously, using the fuser command to list processes that use a UDP port failed to produce the expected results. This was caused by an incorrect use of the /proc/net/tcp socket table instead of /proc/net/udp. With this update, the underlying source code has been adjusted to parse the correct socket table, and fuser no longer fails to list processes for UDP ports.-- Show processes that uses UDP port -Consequence -- Processes aren't listed due to using TCP table instead of UDP. -Fix -- UDP listing now uses UDP table instead of TCP -Result -- Processes that uses UDP are correctly listed
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. http://rhn.redhat.com/errata/RHBA-2013-0118.html