Re: Hi. Regarding "automatic vlan creation"



On Thu, Oct 29, 2009 at 12:31:49AM +0200, Artis Caune wrote:
2009/10/28 Brooks Davis <brooks@xxxxxxxxxxx>:
On Wed, Oct 28, 2009 at 03:18:41PM +0100, Sebastian Hyrwall wrote:
Hi

Now that FreeBSD has support for writing ??, cloned_interfaces="em0.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="" or ifconfig_em0_100="" 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:

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;
}

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





--
Artis Caune

Everything should be made as simple as possible, but not simpler.
_______________________________________________
freebsd-net@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe@xxxxxxxxxxx"

Attachment: pgpX4bMPz7qpz.pgp
Description: PGP signature



Relevant Pages