From owner-freebsd-net@FreeBSD.ORG Wed Oct 28 22:31:55 2009 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2577F106568D for ; Wed, 28 Oct 2009 22:31:55 +0000 (UTC) (envelope-from artis.caune@gmail.com) Received: from mail-bw0-f213.google.com (mail-bw0-f213.google.com [209.85.218.213]) by mx1.freebsd.org (Postfix) with ESMTP id 9E51F8FC1F for ; Wed, 28 Oct 2009 22:31:54 +0000 (UTC) Received: by bwz5 with SMTP id 5so1613028bwz.3 for ; Wed, 28 Oct 2009 15:31:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=5Cuueg68ZEW7vUTBPC7DDotzstonzqEjTMXMvbWwWc0=; b=Nt+o6h4/ORcm/qGk7blj9Cz8RNS0c2jp2kjxZwo3H4+CxdrqMVnrn8Q7ESkTCFa9zU gYaSPKZW9PsU2KrEGN2rjgI5e91i6aPmzf81VlGpPIUf9+jVyiNFWL1l/YQTFnc3sO43 ueszXlXxpO0dN90/09F6GUaYSP5lUH3rmSWDE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=IZx+xjh+WZCcsreSqgX3BkLjO1FOTNRLrLwT+nLvjg1T4y8aYUEcpkFzhAe6v/QCKW S6g6fqE4M72Dm+XRru33pswtHmZa6viPDCn5mwrBwOzuYyjRzOIZTbbYB2PwVm97lwFn MD26gVJvoF0527buikQQEbH2fbO3uFINj+zyo= MIME-Version: 1.0 Received: by 10.204.34.78 with SMTP id k14mr1253247bkd.106.1256769109916; Wed, 28 Oct 2009 15:31:49 -0700 (PDT) In-Reply-To: <20091028164330.GA71430@lor.one-eyed-alien.net> References: <4AE852C1.8090103@keff.org> <20091028164330.GA71430@lor.one-eyed-alien.net> Date: Thu, 29 Oct 2009 00:31:49 +0200 Message-ID: <9e20d71e0910281531o56d82709ife0b76a59bff5f23@mail.gmail.com> From: Artis Caune To: Brooks Davis Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Sebastian Hyrwall , freebsd-net@freebsd.org Subject: Re: Hi. Regarding "automatic vlan creation" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2009 22:31:55 -0000 2009/10/28 Brooks Davis : > 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 . 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.