PERFORCE change 124457 for review
Marko Zec
zec at FreeBSD.org
Wed Aug 1 11:59:51 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=124457
Change 124457 by zec at 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;
More information about the p4-projects
mailing list