From owner-svn-src-all@FreeBSD.ORG Mon Aug 24 10:29:56 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC7AD106564A; Mon, 24 Aug 2009 10:29:56 +0000 (UTC) (envelope-from zec@icir.org) Received: from labs3.cc.fer.hr (labs3.cc.fer.hr [161.53.72.21]) by mx1.freebsd.org (Postfix) with ESMTP id 633578FC14; Mon, 24 Aug 2009 10:29:56 +0000 (UTC) Received: from sluga.fer.hr (sluga.cc.fer.hr [161.53.72.14]) by labs3.cc.fer.hr (8.13.8+Sun/8.12.10) with ESMTP id n7OAI1HK014047; Mon, 24 Aug 2009 12:18:08 +0200 (CEST) Received: from localhost ([161.53.19.8]) by sluga.fer.hr with Microsoft SMTPSVC(6.0.3790.3959); Mon, 24 Aug 2009 12:18:01 +0200 From: Marko Zec To: src-committers@freebsd.org Date: Mon, 24 Aug 2009 12:17:58 +0200 User-Agent: KMail/1.9.10 References: <200908241014.n7OAE96O089368@svn.freebsd.org> In-Reply-To: <200908241014.n7OAE96O089368@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200908241217.58632.zec@icir.org> X-OriginalArrivalTime: 24 Aug 2009 10:18:01.0659 (UTC) FILETIME=[291EA0B0:01CA24A4] Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r196504 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Aug 2009 10:29:56 -0000 On Monday 24 August 2009 12:14:09 Marko Zec wrote: > Author: zec > Date: Mon Aug 24 10:14:09 2009 > New Revision: 196504 > URL: http://svn.freebsd.org/changeset/base/196504 > > Log: > When moving ifnets from one vnet to another, and the ifnet > has ifaddresses of AF_LINK type which thus have an embedded > if_index "backpointer", we must update that if_index backpointer > to reflect the new if_index that our ifnet just got assigned. > > This change affects only options VIMAGE builds. > > Submitted by: bz > Reviewed by: bz > Approved by: re (rwatson), julian (mentor) Missing: MFC after: 3 days > Modified: > head/sys/net/if.c > > Modified: head/sys/net/if.c > =========================================================================== >=== --- head/sys/net/if.c Mon Aug 24 10:09:30 2009 (r196503) > +++ head/sys/net/if.c Mon Aug 24 10:14:09 2009 (r196504) > @@ -589,6 +589,21 @@ if_attach_internal(struct ifnet *ifp, in > /* Reliably crash if used uninitialized. */ > ifp->if_broadcastaddr = NULL; > } > +#ifdef VIMAGE > + else { > + /* > + * Update the interface index in the link layer address > + * of the interface. > + */ > + for (ifa = ifp->if_addr; ifa != NULL; > + ifa = TAILQ_NEXT(ifa, ifa_link)) { > + if (ifa->ifa_addr->sa_family == AF_LINK) { > + sdl = (struct sockaddr_dl *)ifa->ifa_addr; > + sdl->sdl_index = ifp->if_index; > + } > + } > + } > +#endif > > IFNET_WLOCK(); > TAILQ_INSERT_TAIL(&V_ifnet, ifp, if_link);