Date: Wed, 28 Oct 2009 19:08:22 -0500 From: Brooks Davis <brooks@freebsd.org> To: Artis Caune <artis.caune@gmail.com> Cc: Sebastian Hyrwall <sh@keff.org>, freebsd-net@freebsd.org, Brooks Davis <brooks@freebsd.org> Subject: Re: Hi. Regarding "automatic vlan creation" Message-ID: <20091029000822.GA74744@lor.one-eyed-alien.net> In-Reply-To: <9e20d71e0910281531o56d82709ife0b76a59bff5f23@mail.gmail.com> References: <4AE852C1.8090103@keff.org> <20091028164330.GA71430@lor.one-eyed-alien.net> <9e20d71e0910281531o56d82709ife0b76a59bff5f23@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--T4sUOijqQbZv57TR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 29, 2009 at 12:31:49AM +0200, Artis Caune wrote: > 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 ??, cloned_interfaces=3D"em0.= 100" > >> instead of having to create for example a vlan0 and then specify vland= ev > >> 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. >=20 > 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: Sorry but my reation is: eww. There's no way I'd commit that. You'd be randomly loading the vlan code for any interface that had a dot in it. The real change we should make it to add device vlan to GENERIC. It's long past time for it to be in by default. -- Brooks > --- 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; > } >=20 > + /* 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 >=20 >=20 >=20 >=20 > --=20 > Artis Caune >=20 > Everything should be made as simple as possible, but not simpler. > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >=20 --T4sUOijqQbZv57TR Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iD8DBQFK6Nz2XY6L6fI4GtQRAuwDAKDX4q0cJkdMV84GmYJasdvqWRmt6QCgutWi 50tqnMpMK1lUg2fGcxm4LVI= =i/pQ -----END PGP SIGNATURE----- --T4sUOijqQbZv57TR--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091029000822.GA74744>