Page MenuHomeFreeBSD

D45728.diff
No OneTemporary

D45728.diff

diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c
--- a/sys/net/if_loop.c
+++ b/sys/net/if_loop.c
@@ -93,13 +93,9 @@
const struct sockaddr *dst, struct route *ro);
VNET_DEFINE(struct ifnet *, loif); /* Used externally */
-
-#ifdef VIMAGE
VNET_DEFINE_STATIC(struct if_clone *, lo_cloner);
#define V_lo_cloner VNET(lo_cloner)
-#endif
-static struct if_clone *lo_cloner;
static const char loname[] = "lo";
static int
@@ -141,8 +137,6 @@
ifp->if_hwassist = LO_CSUM_FEATURES | LO_CSUM_FEATURES6;
if_attach(ifp);
bpfattach(ifp, DLT_NULL, sizeof(u_int32_t));
- if (V_loif == NULL)
- V_loif = ifp;
*ifpp = ifp;
return (0);
@@ -156,12 +150,9 @@
.destroy_f = lo_clone_destroy,
.flags = IFC_F_AUTOUNIT,
};
- lo_cloner = ifc_attach_cloner(loname, &req);
-#ifdef VIMAGE
- V_lo_cloner = lo_cloner;
-#endif
+ V_lo_cloner = ifc_attach_cloner(loname, &req);
struct ifc_data ifd = { .unit = 0 };
- ifc_create_ifp(loname, &ifd, NULL);
+ ifc_create_ifp(loname, &ifd, &V_loif);
}
VNET_SYSINIT(vnet_loif_init, SI_SUB_PSEUDO, SI_ORDER_ANY,
vnet_loif_init, NULL);

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 8, 11:28 AM (22 h, 54 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14534134
Default Alt Text
D45728.diff (1 KB)

Event Timeline