Subject: pkg/8008: lsof ipv6 fix
To: None <gnats-bugs@gnats.netbsd.org>
From: Wolfgang Rupprecht <wolfgang@wsrcc.com>
List: netbsd-bugs
Date: 07/15/1999 16:30:55
>Number:         8008
>Category:       pkg
>Synopsis:       lsof needs ipv6 defines turned on
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager (NetBSD software packages system bug manager)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jul 15 16:20:01 1999
>Last-Modified:
>Originator:     Wolfgang Rupprecht
>Organization:
W S Rupprecht Computer Consulting, Fremont CA
>Release:        NetBSD-current 7/14/99
>Environment:
System: NetBSD capsicum.wsrcc.com 1.4F NetBSD 1.4F (WSRCC) #0: Wed Jul 14 08:59:31 PDT 1999 root@capsicum.wsrcc.com:/v/src/netbsd/NetBSD-current/usr/src/sys/arch/i386/compile/WSRCC i386


>Description:
	lsof doesn't compile up with ipv6 defined turned on.  The resulting
	display doesn't tell much about ipv6 sockets.

>How-To-Repeat:
	make ; make install ; lsof

  before fix:

rtcmd   25781 root    5u  inet 0xf08ffb6c      0t0   TCP *:2102 (LISTEN)
rtcmd   25781 root    6u  sock                 0t0       no further information on AF_INET6 

  after fix:

rtcmd   25781 root    5u  IPv4 0xf08ffb6c      0t0   TCP *:2102 (LISTEN)
rtcmd   25781 root    6u  IPv6 0xf0a2d800      0t0   TCP *:* 

>Fix:
	add the following patch as patch-ad

# patch file patch-ad

--- Configure.~1~	Wed Jul 14 09:16:34 1999
+++ Configure	Thu Jul 15 15:52:47 1999
@@ -1632,6 +1632,10 @@
     then
 	LSOF_CFGF="$LSOF_CFGF -DHASNFSPROTO"
     fi	# }
+    if test -r ${LSOF_INCLUDE}/netinet6/in6.h	# {
+    then
+	LSOF_CFGF="$LSOF_CFGF -DHASIPv6"
+    fi	# }
     LSOF_TMP1=0
     if test "X$NETBSD_SYS" = "X"	# {
     then


>Audit-Trail:
>Unformatted: