From owner-p4-projects@FreeBSD.ORG Sat May 9 02:38:23 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B9B1C106566C; Sat, 9 May 2009 02:38:22 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7950F106564A for ; Sat, 9 May 2009 02:38:22 +0000 (UTC) (envelope-from zec@fer.hr) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 6830E8FC19 for ; Sat, 9 May 2009 02:38:22 +0000 (UTC) (envelope-from zec@fer.hr) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n492cMRX065434 for ; Sat, 9 May 2009 02:38:22 GMT (envelope-from zec@fer.hr) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n492cLbe065432 for perforce@freebsd.org; Sat, 9 May 2009 02:38:21 GMT (envelope-from zec@fer.hr) Date: Sat, 9 May 2009 02:38:21 GMT Message-Id: <200905090238.n492cLbe065432@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zec@fer.hr using -f From: Marko Zec To: Perforce Change Reviews Cc: Subject: PERFORCE change 161807 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 May 2009 02:38:23 -0000 http://perforce.freebsd.org/chv.cgi?CH=161807 Change 161807 by zec@zec_tpx32 on 2009/05/09 02:37:24 Record in which vnet has this ifnet been attached for the first time, so in case that vnet is not the default vnet, we do not ever push that ifnet above the recorded home_vnet level in the vnet hierarchy. Example: if we create a vnet or ng_eiface interface in a non-default vnet, we do not ever wish for those to end up in the default. Affected files ... .. //depot/projects/vimage-commit2/src/sys/net/if.c#55 edit Differences ... ==== //depot/projects/vimage-commit2/src/sys/net/if.c#55 (text+ko) ==== @@ -675,6 +675,12 @@ #ifdef VIMAGE ifp->if_vnet = curvnet; + /* + * Record in which vnet has this ifnet been attached + * for the first time. + */ + if (ifp->if_home_vnet == NULL) + ifp->if_home_vnet = curvnet; #endif if_addgroup(ifp, IFG_ALL);