Bug 127106

Summary: netstat with --ip flag excludes ipv6 servers, contrary to man page
Product: [Fedora] Fedora Reporter: Robin Green <greenrd>
Component: net-toolsAssignee: Radek Vokál <rvokal>
Status: CLOSED WORKSFORME QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 1   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-11-25 12:54:21 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:

Description Robin Green 2004-07-01 21:53:09 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040622

Description of problem:
I am running tomcat on port 8080. netstat -anp|grep 8080 shows tomcat,
whereas netstat -anp --ip|grep 8080 returns nothing. The man page says
--ip includes all tcp and udp stuff, so tomcat should be included.

Version-Release number of selected component (if applicable):
net-tools-1.60-20.1

How reproducible:
Always

Steps to Reproduce:
1. Run a service e.g. tomcat which listens on an IPv6 address
2. netstat -anp --ip | grep $port_that_the_service_listens_on

Actual Results:  No results

Expected Results:  
tcp        0      0 :::8080                 :::*                   
LISTEN      9941/java


Additional info:

All the other lines output by the above netstat command had IPv4
addresses.

Comment 1 Phil Knirsch 2004-07-12 15:11:55 UTC
Have you tried using the --protocol=inet parameter and checked if that
works?

Read ya, Phil

Comment 2 Robin Green 2004-07-13 09:37:54 UTC
Just tried it. The results are identical for --ip and --protocol=inet,
i.e. they're both wrong.

Comment 3 Radek Vokál 2004-11-25 12:54:21 UTC
I didn't test it with tomcat but just with ssh deamon which is
configured to listen to ipv6 adresses. Seems that it works fine. The
results are as expected. 

#netstat -A inet6 -ln
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address      
      State
tcp        0      0 :::22                       :::*                 
      LISTEN
udp        0      0 :::32770                :::*