From owner-svn-src-head@FreeBSD.ORG Fri Dec 3 15:49:07 2010 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D90411065672; Fri, 3 Dec 2010 15:49:07 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) by mx1.freebsd.org (Postfix) with ESMTP id 6E92E8FC16; Fri, 3 Dec 2010 15:49:07 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.3/8.14.3) with ESMTP id oB3FDhS1007665; Fri, 3 Dec 2010 09:13:43 -0600 (CST) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.3/8.14.3/Submit) id oB3FDhnq007664; Fri, 3 Dec 2010 09:13:43 -0600 (CST) (envelope-from brooks) Date: Fri, 3 Dec 2010 09:13:43 -0600 From: Brooks Davis To: Gavin Atkinson Message-ID: <20101203151343.GA7429@lor.one-eyed-alien.net> References: <201012010324.oB13OdL8060240@svn.freebsd.org> <1291295967.58583.59.camel@buffy.york.ac.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SLDf9lqlvOQaIe6s" Content-Disposition: inline In-Reply-To: <1291295967.58583.59.camel@buffy.york.ac.uk> User-Agent: Mutt/1.5.17 (2007-11-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (lor.one-eyed-alien.net [127.0.0.1]); Fri, 03 Dec 2010 09:13:43 -0600 (CST) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Weongyo Jeong Subject: Re: svn commit: r216089 - head/sbin/ifconfig X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Dec 2010 15:49:07 -0000 --SLDf9lqlvOQaIe6s Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 02, 2010 at 01:19:27PM +0000, Gavin Atkinson wrote: > On Wed, 2010-12-01 at 03:24 +0000, Weongyo Jeong wrote: > > Author: weongyo > > Date: Wed Dec 1 03:24:38 2010 > > New Revision: 216089 > > URL: http://svn.freebsd.org/changeset/base/216089 > >=20 > > Log: > > Don't print usbus[0-9] interfaces that it's not the interesting > > interface type for ifconfig(8). > >=20 > > Modified: > > head/sbin/ifconfig/ifconfig.c > >=20 > > Modified: head/sbin/ifconfig/ifconfig.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=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D > > --- head/sbin/ifconfig/ifconfig.c Tue Nov 30 22:39:46 2010 (r216088) > > +++ head/sbin/ifconfig/ifconfig.c Wed Dec 1 03:24:38 2010 (r216089) > > @@ -295,6 +295,8 @@ main(int argc, char *argv[]) > > sdl =3D (const struct sockaddr_dl *) ifa->ifa_addr; > > else > > sdl =3D NULL; > > + if (sdl !=3D NULL && sdl->sdl_type =3D=3D IFT_USB) > > + continue; > > if (cp !=3D NULL && strcmp(cp, ifa->ifa_name) =3D=3D 0 && !namesonly) > > continue; > > iflen =3D strlcpy(name, ifa->ifa_name, sizeof(name)); >=20 > I may be misunderstanding, but isn't this more of a hack than the > correct solution? I appreciate that there are a large number of defined > interface types, but I wonder if we should instead check for interface > types we are prepared to accept, rather than skipping ones we know we > don't want? >=20 > Was this issue introduced with the introduction of the USB pcap changes? We might consider an interface flag for interfaces that aren't configurable in a meaninful way by ifconfig. Then ifconfig wouldn't have to change going forward. -- Brooks --SLDf9lqlvOQaIe6s Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iD8DBQFM+QkmXY6L6fI4GtQRAk1NAKDEHiFPICAU7S7mbxZLwDPJLrYXhwCeO921 bjqBRJIGdg6iCPJGKQ7jRvo= =EOJN -----END PGP SIGNATURE----- --SLDf9lqlvOQaIe6s--