Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Oct 2009 00:31:49 +0200
From:      Artis Caune <artis.caune@gmail.com>
To:        Brooks Davis <brooks@freebsd.org>
Cc:        Sebastian Hyrwall <sh@keff.org>, freebsd-net@freebsd.org
Subject:   Re: Hi. Regarding "automatic vlan creation"
Message-ID:  <9e20d71e0910281531o56d82709ife0b76a59bff5f23@mail.gmail.com>
In-Reply-To: <20091028164330.GA71430@lor.one-eyed-alien.net>
References:  <4AE852C1.8090103@keff.org> <20091028164330.GA71430@lor.one-eyed-alien.net>

next in thread | previous in thread | raw e-mail | index | archive | help
2009/10/28 Brooks Davis <brooks@freebsd.org>:
> On Wed, Oct 28, 2009 at 03:18:41PM +0100, Sebastian Hyrwall wrote:
>> Hi
>>
>> Now that FreeBSD has support for writing =C2=A0, cloned_interfaces=3D"em=
0.100"
>> instead of having to create for example a vlan0 and then specify vlandev
>> etc in ifconfig. What is the correct ifconfig-line in rc.conf for this?
>>
>> ifconfig_em0.100=3D"" or ifconfig_em0_100=3D"" does not work.
>
> It should be ifconfig_em0_100.

btw, wouldn't it be nice not to bother with loader.conf when using
<device>.<vlan> syntax?
This patch will load if_vlan automatically in this case:




--- sbin/ifconfig/ifconfig.c	2009-10-26 14:11:16 +0000
+++ sbin/ifconfig/ifconfig.c	2009-10-28 21:43:07 +0000
@@ -998,6 +998,10 @@
 			break;
 		}

+	/* try to load vlan module if interface name is device.vlan_id */
+	if (index(name, '.') !=3D NULL)
+		strlcpy(ifname, "vlan", sizeof(ifname));
+
 	/* turn interface and unit into module name */
 	strcpy(ifkind, "if_");
 	strlcpy(ifkind + MOD_PREFIX_LEN, ifname,





--=20
Artis Caune

    Everything should be made as simple as possible, but not simpler.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9e20d71e0910281531o56d82709ife0b76a59bff5f23>