From owner-svn-src-all@FreeBSD.ORG Fri Dec 3 13:16:30 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 368BC10656A7; Fri, 3 Dec 2010 13:16:30 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from ixe-mta-27.emailfiltering.com (ixe-mta-27-tx.emailfiltering.com [194.116.199.158]) by mx1.freebsd.org (Postfix) with ESMTP id 04C198FC15; Fri, 3 Dec 2010 13:16:28 +0000 (UTC) Received: from mail-gw12.york.ac.uk ([144.32.129.162]) by ixe-mta-27.emailfiltering.com with emfmta (version 4.6.0.72) by TLS id 840702758 for src-committers@FreeBSD.org; dd031def5239703c; Fri, 03 Dec 2010 12:43:07 +0000 Received: from buffy-128.york.ac.uk ([144.32.128.160]:57527 helo=buffy.york.ac.uk) by mail-gw12.york.ac.uk with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1POUyg-0001wU-Aq; Fri, 03 Dec 2010 12:43:06 +0000 Received: from buffy.york.ac.uk (localhost [127.0.0.1]) by buffy.york.ac.uk (8.14.4/8.14.4) with ESMTP id oB2DJSPS060087; Thu, 2 Dec 2010 13:19:28 GMT (envelope-from gavin@FreeBSD.org) Received: (from ga9@localhost) by buffy.york.ac.uk (8.14.4/8.14.4/Submit) id oB2DJRuG060086; Thu, 2 Dec 2010 13:19:27 GMT (envelope-from gavin@FreeBSD.org) X-Authentication-Warning: buffy.york.ac.uk: ga9 set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson To: Weongyo Jeong In-Reply-To: <201012010324.oB13OdL8060240@svn.freebsd.org> References: <201012010324.oB13OdL8060240@svn.freebsd.org> Content-Type: text/plain; charset="ASCII" Content-Transfer-Encoding: quoted-printable Date: Thu, 02 Dec 2010 13:19:27 +0000 Message-ID: <1291295967.58583.59.camel@buffy.york.ac.uk> Mime-Version: 1.0 X-Mailer: Evolution 2.30.1.2 FreeBSD GNOME Team Port Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r216089 - head/sbin/ifconfig X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Dec 2010 13:16:30 -0000 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)); 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? Was this issue introduced with the introduction of the USB pcap changes? Thanks, Gavin --=20 Gavin Atkinson FreeBSD committer and bugmeister GPG: A093262B (313A A79F 697D 3A5C 216A EDF5 935D EF44 A093 262B)