bin/176639: netstat will display pcb table twice for any ip interfaces.

Frank Chen frank.chen2 at baesystems.com
Mon Mar 4 15:50:01 UTC 2013


>Number:         176639
>Category:       bin
>Synopsis:       netstat will display pcb table twice for any ip interfaces.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 04 15:50:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Frank Chen
>Release:        9.0
>Organization:
BAE systems inc.
>Environment:
>Description:
run netstat -a -A for a system with ip(ip6) interface, the interface will show as:

Tcpcb     Proto   Recv-Q Send-Q Local Address Foreign Address (state)
c6770ec4   ip 4        0      0 *.*           *.*
c6770ec4   ip64        0      0 *.*           *.*
(for ip6 interfaces)
xxxxxxxx   ip 6        0      0 *.*           *.*
xxxxxxxx   ip66        0      0 *.*           *.*
>How-To-Repeat:

>Fix:
--- inet.c	2012-09-19 16:43:07.390456077 -0400
+++ /tmp/inet.c	2013-03-04 10:38:19.345392528 -0500
@@ -85,7 +85,7 @@
 char	*inetname(struct in_addr *);
 void	inetprint(struct in_addr *, int, const char *, int);
 #ifdef INET6
-static int udp_done, tcp_done, sdp_done;
+static int udp_done, tcp_done, sdp_done, raw_done;
 #endif /* INET6 */
 
 static int
@@ -338,6 +338,14 @@
 			udp_done = 1;
 #endif
 		break;
+	case IPPROTO_RAW:
+#ifdef INET6
+		if (raw_done != 0)
+			return;
+		else
+			raw_done = 1;
+#endif
+		break;
 	}
 	if (live) {
 		if (!pcblist_sysctl(proto, name, &buf, istcp))


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list