From owner-freebsd-stable@FreeBSD.ORG Wed Dec 26 20:40:11 2007 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9124E16A420 for ; Wed, 26 Dec 2007 20:40:11 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.186]) by mx1.freebsd.org (Postfix) with ESMTP id 23CB413C4E1 for ; Wed, 26 Dec 2007 20:40:10 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: by mu-out-0910.google.com with SMTP id w9so1578647mue.6 for ; Wed, 26 Dec 2007 12:40:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=gSYBcFyDWIbI/UjbBLkHPxAPNAoEkG9JJOIi3sKxMc4=; b=QDsJKGbE8E7u7GvO67NiPG3tFzMEA51hzUJeFkuMN4GxiE3CFnQf9zk4p6sjx1BVlz1Ut9FeNtm/lXJyEUwQBco6utYQDGBIbjvLeaei7StTtflwWFHgcD24Fy7UdeGWvRz9QDoaI4YVRWqRWh0j6vfGEaDFV3deIjOIvWcMEoE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=t0GKzQo/WJJQ6bhiXVUildluoOgqGkWwYI+6X3pFRTgZ63vsfJ2wZ5k15oc5XjInrLrCnGODHnFK9rwcp4zQuSOacLauLUbfYm0L6Cq1slZd0Cl23kKqIcrgfPZViYBVSrg2DubxbQJ+6FX0kt29eGSRsC33bzVNxiQrXGVF8I8= Received: by 10.78.136.9 with SMTP id j9mr8698255hud.46.1198701609089; Wed, 26 Dec 2007 12:40:09 -0800 (PST) Received: by 10.78.46.11 with HTTP; Wed, 26 Dec 2007 12:40:08 -0800 (PST) Message-ID: Date: Wed, 26 Dec 2007 23:40:08 +0300 From: pluknet To: "Krassimir Slavchev" In-Reply-To: <476F7581.8080100@bulinfo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <476F7581.8080100@bulinfo.net> Cc: FreeBSD Subject: Re: ifconfig options? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Dec 2007 20:40:11 -0000 Hi, On 24/12/2007, Krassimir Slavchev wrote: > 'ifconfig -l [address_family]' does not work correct on RELENG_7 > > > FreeBSD 6.3-BETA2: > # ifconfig -l > em0 em1 plip0 lo0 pflog0 > > #ifconfig -l ether > em0 em1 > > But: > FreeBSD 7.0-BETA4: > # ifconfig -l > em0 em1 plip0 lo0 pflog0 > > #ifconfig -l ether > em0 em1 plip0 lo0 pflog0 > > I need this functionality to get all ethernet interfaces. Is there other > way to do this? > To revert this functionality try this patch please. --- /usr/src/sbin/ifconfig/ifconfig.c 2007-12-26 23:25:17.000000000 +0300 +++ /tmp/ifconfig.c 2007-12-26 23:18:53.000000000 +0300 @@ -298,9 +298,12 @@ * Are we just listing the interfaces? */ if (namesonly) { - if (ifindex > 1) - printf(" "); - fputs(name, stdout); + if (afp == NULL || afp->af_af != AF_LINK || + sdl->sdl_type == IFT_ETHER) { + if (ifindex > 1) + printf(" "); + fputs(name, stdout); + } continue; }