From owner-freebsd-current@FreeBSD.ORG Fri Jul 14 22:46:30 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 77B1116A4DD; Fri, 14 Jul 2006 22:46:30 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from sccmmhc92.asp.att.net (sccmmhc92.asp.att.net [204.127.203.212]) by mx1.FreeBSD.org (Postfix) with ESMTP id DC35F43D49; Fri, 14 Jul 2006 22:46:29 +0000 (GMT) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net ([12.207.12.9]) by sccmmhc92.asp.att.net (sccmmhc92) with ESMTP id <20060714224628m92002s93te>; Fri, 14 Jul 2006 22:46:28 +0000 Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.13.6/8.13.6) with ESMTP id k6EMkLGR079756; Fri, 14 Jul 2006 17:46:22 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.13.6/8.13.6/Submit) id k6EMkKXk079755; Fri, 14 Jul 2006 17:46:20 -0500 (CDT) (envelope-from brooks) Date: Fri, 14 Jul 2006 17:46:20 -0500 From: Brooks Davis To: Julian Elischer Message-ID: <20060714224620.GA79721@lor.one-eyed-alien.net> References: <44B8171A.2070209@elischer.org> <20060714222239.GA6444@in-addr.com> <44B81D3F.2030302@elischer.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gKMricLos+KVdGMg" Content-Disposition: inline In-Reply-To: <44B81D3F.2030302@elischer.org> User-Agent: Mutt/1.5.11 Cc: Gary Palmer , 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:46:30 -0000 --gKMricLos+KVdGMg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 14, 2006 at 03:39:59PM -0700, Julian Elischer wrote: > Gary Palmer wrote: >=20 > >On Fri, Jul 14, 2006 at 03:13:46PM -0700, Julian Elischer wrote: > >=20 > > > >>is ther ean official way that netstat should be using to NOT try fo ipv= 6=20 > >>stuff? > >> > >> > >>%netstat -s>/dev/null > >>Warning: sysctl(net.inet6.ip6.rip6stats): No such file or directory > >> =20 > >> > > > >doesn't the=20 > > > >-f inet > > > >parameter stop that? > >=20 > > >=20 > yeah but I shouldn't have to say that.. > It doesn't complain about the fact that appletalk isn't compiled into=20 > the system.. >=20 > I put forward the following patch: > nutmeg:rjulian 33] cvs diff -u > cvs server: Diffing . > Index: inet6.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > 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] =3D IPV6CTL_RIP6STATS; > l =3D 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 !=3D ENOENT) > + perror("Warning: sysctl(net.inet6.ip6.rip6stats)"= ); > return; > } >=20 > nutmeg:rjulian 34] pwd > /build/master/usr/src/usr.bin/netstat > nutmeg:rjulian 35] That looks like the right thing to me. -- Brooks --gKMricLos+KVdGMg Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFEuB67XY6L6fI4GtQRAjwXAKCAskw2yZv5vqtOsSuBVS/rrzbiKwCg5DOr PG8a/k9p8QylSmNRGbgsEuQ= =xE/Q -----END PGP SIGNATURE----- --gKMricLos+KVdGMg--