Date: Wed, 6 Dec 2006 00:01:18 GMT From: Marko Zec <zec@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 111169 for review Message-ID: <200612060001.kB601Igq011850@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=111169 Change 111169 by zec@zec_tpx32 on 2006/12/06 00:01:10 Set V_loif to point to the ifnet corresponding to the "lo0" interface before calling if_attach() for it. This is important since in rt_dispatch() we mark the looped back mbufs to have m_pkthdr.rcvif set to V_loif, so we should guarantee that V_loif will be valid at the time the first PF_ROUTE message will be generated. Could be also that I'm fixing symptomps here and not the causes, i.e. some kind of leakage between vnet instances. XXX. Affected files ... .. //depot/projects/vimage/src/sys/net/if_loop.c#4 edit Differences ... ==== //depot/projects/vimage/src/sys/net/if_loop.c#4 (text+ko) ==== @@ -157,6 +157,11 @@ free(sc, M_LO); return (ENOSPC); } +#ifdef VIMAGE + ifp->if_vnetb = curvnetb; +#endif + if (V_loif == NULL) + V_loif = ifp; if_initname(ifp, ifc->ifc_name, unit); ifp->if_mtu = LOMTU; @@ -170,8 +175,6 @@ mtx_lock(&lo_mtx); LIST_INSERT_HEAD(&V_lo_list, sc, sc_next); mtx_unlock(&lo_mtx); - if (V_loif == NULL) - V_loif = ifp; return (0); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200612060001.kB601Igq011850>