From owner-freebsd-net@FreeBSD.ORG Wed May 21 19:23:02 2008 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 1B96610656B5 for ; Wed, 21 May 2008 19:23:02 +0000 (UTC) (envelope-from ndenev@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.177]) by mx1.freebsd.org (Postfix) with ESMTP id 5DA8E8FC15 for ; Wed, 21 May 2008 19:23:01 +0000 (UTC) (envelope-from ndenev@gmail.com) Received: by py-out-1112.google.com with SMTP id p76so332131pyb.10 for ; Wed, 21 May 2008 12:23:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=1+IP36IGQ3NO5rpEXPxVEZAkZEexTocfy/MD/T0iMO4=; b=glCcIwSSruKfwVCYqH6XkZoQ5G9vD1sK79IdjDwpJvm4qaB7iSpowcNp7auY5OMi1km1I3MuZjjwmyJzvZzX4oWgJkcEO1jkTLyJX4L+qHuyEEvF+i39ZL8fiuTX8oXRn7K5Mb1KuTG8aJv3aENsLGymOZT06EDxB8UQx4HyU1s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=iqgvNuxZ2NTteRnemH0NK4D60hpVYZBZEL45VQy3VqKL2k104qw2NZaQkEb5ZrN3Y7OgMc/tiYZPHcCl0GRXcBEGGSLeX8pqL2iKNDoPRCfLQxtYXf8v18kPVlN36/a7ZNplH8KXiLr+qgyA2sayLPSozMxiw84r4WNU7KgBAAI= Received: by 10.140.136.6 with SMTP id j6mr5332890rvd.199.1211397780034; Wed, 21 May 2008 12:23:00 -0700 (PDT) Received: by 10.141.171.3 with HTTP; Wed, 21 May 2008 12:23:00 -0700 (PDT) Message-ID: <2e77fc10805211223l7fd69e4cwdd488bada0dc7b95@mail.gmail.com> Date: Wed, 21 May 2008 22:23:00 +0300 From: "Niki Denev" Sender: ndenev@gmail.com To: "Max Laier" In-Reply-To: <200805211944.42418.max@love2party.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <2e77fc10805211031n6c42ffd2u3dee28164094b83b@mail.gmail.com> <200805211944.42418.max@love2party.net> X-Google-Sender-Auth: d22cb49347acdf04 Cc: freebsd-net@freebsd.org Subject: Re: lagg0.2 style vlans on lagg(4) interface 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, 21 May 2008 19:23:02 -0000 On Wed, May 21, 2008 at 8:44 PM, Max Laier wrote: > On Wednesday 21 May 2008 19:31:46 Niki Denev wrote: >> If one tries to use lagg0.2 style vlans on lagg0 interface configured >> from rc.conf it does't work. >> The problem is that all of the cloned interfaces (lagg0 , lagg0.2, etc) >> are created before any other interface configuration is done, >> and in this case lagg0 is created, then lagg0.2 is created. >> But because lagg0 does not have any members yet, it's MAC address >> is all zeroes, and this is inherited by the vlan interfaces. >> At the next step the members are added to the lagg0 interface and it's >> mac address gets set, >> but the vlan interfaces never see this change and remain with mac >> address 00:00:00:00:00:00 and in unusable state. >> >> Does it sound reasonable for the vlan(4) interfaces to update their >> mac address when their parent changes it. >> (this should probably look more like the parent telling the vlans >> attached to it that it's mac has changed, but >> i'm not sure if the parent knows about children interfaces) > > It doesn't (and shouldn't have to). I'd simply add an > EVENTHANDLER_INVOKE(ifaddr_event, ifp) to if_setlladdr() - we do that for > INET[6] address already. Then vlan (and any other device interested in > LLaddress changes) can simply register to that eventhandler and resync. > > -- > /"\ Best regards, | mlaier@freebsd.org > \ / Max Laier | ICQ #67774661 > X http://pf4freebsd.love2party.net/ | mlaier@EFnet > / \ ASCII Ribbon Campaign | Against HTML Mail and News > > Yes, you are absolutely right. I wasn't aware of EVENTHANDLER(4). Niki