Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Aug 2009 21:52:26 +0300
From:      Artis Caune <artis.caune@gmail.com>
To:        freebsd-net@freebsd.org
Subject:   Re: bin/137641: ifconfig(8): various problems with  "vlan_device.vlan_id" syntax
Message-ID:  <9e20d71e0908101152tcaf4cc3p83ff6de3ac1f1280@mail.gmail.com>
In-Reply-To: <200908101840.n7AIe3Zf084075@freefall.freebsd.org>
References:  <200908101840.n7AIe3Zf084075@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
2009/8/10 Artis Caune <artis.caune@gmail.com>:
> The following reply was made to PR bin/137641; it has been noted by GNATS.
>
>  Hi,
>
>  attached patch should fix automatic loading of if_vlan when creating
>  interface as device.vlan_id and vlan module is not loaded.

Here is a patch.




-- 
Artis Caune

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

[-- Attachment #2 --]
Index: ifconfig.c
===================================================================
--- ifconfig.c	(revision 196047)
+++ ifconfig.c	(working copy)
@@ -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,

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