Date: Wed, 02 Jan 2008 18:20:23 +0200 From: Krassimir Slavchev <krassi@bulinfo.net> To: pluknet <pluknet@gmail.com> Cc: FreeBSD <freebsd-stable@freebsd.org> Subject: Re: ifconfig options? Message-ID: <477BB9C7.8080002@bulinfo.net> In-Reply-To: <a31046fc0712261240o4f54803eq96b0d840660457e4@mail.gmail.com> References: <476F7581.8080100@bulinfo.net> <a31046fc0712261240o4f54803eq96b0d840660457e4@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
This patch fixes the problem!
# ifconfig -l
bce0 bce1 lo0
# ifconfig -l ether
bce0 bce1
Thanks
pluknet wrote:
> 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;
> }
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (FreeBSD)
iD8DBQFHe7nGxJBWvpalMpkRAn7MAKCsjDSf+uDsMQaH1Wxh09TsP43k5wCcDksO
XPkb7nNG2p0wo6XvlvZlb+E=
=p0rg
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?477BB9C7.8080002>
