From owner-freebsd-current@FreeBSD.ORG Fri Jul 14 22:40:00 2006 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5238016A4DA; Fri, 14 Jul 2006 22:40:00 +0000 (UTC) (envelope-from julian@elischer.org) Received: from a50.ironport.com (a50.ironport.com [63.251.108.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id EA37943D49; Fri, 14 Jul 2006 22:39:59 +0000 (GMT) (envelope-from julian@elischer.org) Received: from unknown (HELO [10.251.18.229]) ([10.251.18.229]) by a50.ironport.com with ESMTP; 14 Jul 2006 15:40:00 -0700 Message-ID: <44B81D3F.2030302@elischer.org> Date: Fri, 14 Jul 2006 15:39:59 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.13) Gecko/20060414 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Gary Palmer References: <44B8171A.2070209@elischer.org> <20060714222239.GA6444@in-addr.com> In-Reply-To: <20060714222239.GA6444@in-addr.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: current@freebsd.org Subject: Re: netstat and ipv6 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Jul 2006 22:40:00 -0000 Gary Palmer wrote: >On Fri, Jul 14, 2006 at 03:13:46PM -0700, Julian Elischer wrote: > > >>is ther ean official way that netstat should be using to NOT try fo ipv6 >>stuff? >> >> >>%netstat -s>/dev/null >>Warning: sysctl(net.inet6.ip6.rip6stats): No such file or directory >> >> > >doesn't the > >-f inet > >parameter stop that? > > yeah but I shouldn't have to say that.. It doesn't complain about the fact that appletalk isn't compiled into the system.. I put forward the following patch: nutmeg:rjulian 33] cvs diff -u cvs server: Diffing . Index: inet6.c =================================================================== RCS file: /usr/local/cvsroot/freebsd/src/usr.bin/netstat/inet6.c,v retrieving revision 1.25 diff -u -r1.25 inet6.c --- inet6.c 28 Jul 2004 16:03:12 -0000 1.25 +++ inet6.c 14 Jul 2006 22:39:08 -0000 @@ -1030,7 +1030,9 @@ mib[3] = IPV6CTL_RIP6STATS; l = sizeof(rip6stat); if (sysctl(mib, 4, &rip6stat, &l, NULL, 0) < 0) { - perror("Warning: sysctl(net.inet6.ip6.rip6stats)"); + /* Just shut up if the kernel doesn't have ipv6. */ + if (errno != ENOENT) + perror("Warning: sysctl(net.inet6.ip6.rip6stats)"); return; } nutmeg:rjulian 34] pwd /build/master/usr/src/usr.bin/netstat nutmeg:rjulian 35] >Gary >_______________________________________________ >freebsd-current@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-current >To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" > >