Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Aug 2007 11:59:50 GMT
From:      Marko Zec <zec@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 124457 for review
Message-ID:  <200708011159.l71Bxo7q099162@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=124457

Change 124457 by zec@zec_tpx32 on 2007/08/01 11:59:16

	Make ng_gif compatible with options VIMAGE kernels.

Affected files ...

.. //depot/projects/vimage/src/sys/netgraph/ng_gif.c#2 edit

Differences ...

==== //depot/projects/vimage/src/sys/netgraph/ng_gif.c#2 (text+ko) ====

@@ -69,6 +69,8 @@
  * ng_gif(4) netgraph node type
  */
 
+#include "opt_vimage.h"
+
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/kernel.h>
@@ -77,7 +79,9 @@
 #include <sys/errno.h>
 #include <sys/syslog.h>
 #include <sys/socket.h>
+#include <sys/vimage.h>
 
+#include <net/vnet.h>
 #include <net/if.h>
 #include <net/route.h>
 #include <net/if_types.h>
@@ -560,10 +564,13 @@
 
 		/* Create nodes for any already-existing gif interfaces */
 		IFNET_RLOCK();
-		TAILQ_FOREACH(ifp, &ifnet, if_link) {
+		VNET_ITERLOOP_BEGIN_QUIET();
+		INIT_VNET_NET(curvnet);
+		TAILQ_FOREACH(ifp, &V_ifnet, if_link) {
 			if (ifp->if_type == IFT_GIF)
 				ng_gif_attach(ifp);
 		}
+		VNET_ITERLOOP_END();
 		IFNET_RUNLOCK();
 		break;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200708011159.l71Bxo7q099162>