Hi. Regarding "automatic vlan creation"
Brooks Davis
brooks at freebsd.org
Thu Oct 29 00:09:40 UTC 2009
On Thu, Oct 29, 2009 at 12:31:49AM +0200, Artis Caune wrote:
> 2009/10/28 Brooks Davis <brooks at 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="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 at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-net/attachments/20091029/4c3a591a/attachment.pgp
More information about the freebsd-net
mailing list