Date: Wed, 26 Dec 2007 23:40:08 +0300 From: pluknet <pluknet@gmail.com> To: "Krassimir Slavchev" <krassi@bulinfo.net> Cc: FreeBSD <freebsd-stable@freebsd.org> Subject: Re: ifconfig options? Message-ID: <a31046fc0712261240o4f54803eq96b0d840660457e4@mail.gmail.com> In-Reply-To: <476F7581.8080100@bulinfo.net> References: <476F7581.8080100@bulinfo.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, On 24/12/2007, Krassimir Slavchev <krassi@bulinfo.net> 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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a31046fc0712261240o4f54803eq96b0d840660457e4>