Differential D30722 Diff 90886 emulators/virtualbox-ose/files/patch-src_VBox_HostDrivers_VBoxNetFlt_freebsd_VBoxNetFlt-freebsd.c
Changeset View
Changeset View
Standalone View
Standalone View
emulators/virtualbox-ose/files/patch-src_VBox_HostDrivers_VBoxNetFlt_freebsd_VBoxNetFlt-freebsd.c
- This file was moved from emulators/virtualbox-ose/files/patch-src-VBox-HostDrivers-VBoxNetFlt-freebsd-VBoxNetFlt-freebsd.c.
--- src/VBox/HostDrivers/VBoxNetFlt/freebsd/VBoxNetFlt-freebsd.c.orig 2021-01-07 15:41:28 UTC | --- src/VBox/HostDrivers/VBoxNetFlt/freebsd/VBoxNetFlt-freebsd.c.orig 2021-04-28 16:31:54 UTC | ||||
+++ src/VBox/HostDrivers/VBoxNetFlt/freebsd/VBoxNetFlt-freebsd.c | +++ src/VBox/HostDrivers/VBoxNetFlt/freebsd/VBoxNetFlt-freebsd.c | ||||
@@ -52,6 +52,7 @@ | @@ -52,6 +52,7 @@ | ||||
#include <net/if_dl.h> | #include <net/if_dl.h> | ||||
#include <net/if_types.h> | #include <net/if_types.h> | ||||
#include <net/ethernet.h> | #include <net/ethernet.h> | ||||
+#include <net/if_vlan_var.h> | +#include <net/if_vlan_var.h> | ||||
#include <netgraph/ng_message.h> | #include <netgraph/ng_message.h> | ||||
#include <netgraph/netgraph.h> | #include <netgraph/netgraph.h> | ||||
@@ -73,6 +74,7 @@ | @@ -73,6 +74,7 @@ | ||||
#define VBOXNETFLT_OS_SPECFIC 1 | #define VBOXNETFLT_OS_SPECFIC 1 | ||||
#include "../VBoxNetFltInternal.h" | #include "../VBoxNetFltInternal.h" | ||||
+#include "freebsd/the-freebsd-kernel.h" | +#include "freebsd/the-freebsd-kernel.h" | ||||
static int vboxnetflt_modevent(struct module *, int, void *); | static int vboxnetflt_modevent(struct module *, int, void *); | ||||
static ng_constructor_t ng_vboxnetflt_constructor; | static ng_constructor_t ng_vboxnetflt_constructor; | ||||
@@ -361,7 +363,14 @@ static int ng_vboxnetflt_rcvdata(hook_p hook, item_p i | @@ -149,6 +151,7 @@ NETGRAPH_INIT(vboxnetflt, &ng_vboxnetflt_typestruct); | ||||
*/ | |||||
MODULE_VERSION(vboxnetflt, 1); | |||||
MODULE_DEPEND(ng_vboxnetflt, vboxdrv, 1, 1, 1); | |||||
+MODULE_DEPEND(ng_vboxnetflt, ng_ether, 1, 1, 1); | |||||
/** | |||||
* The (common) global data. | |||||
@@ -181,8 +184,6 @@ static int vboxnetflt_modevent(struct module *pMod, in | |||||
printf("vboxNetFltInitGlobalsAndIdc failed %d\n", rc); | |||||
return RTErrConvertToErrno(rc); | |||||
} | |||||
- /* No MODULE_VERSION in ng_ether so we can't MODULE_DEPEND it */ | |||||
- kern_kldload(curthread, "ng_ether", NULL); | |||||
break; | |||||
case MOD_UNLOAD: | |||||
@@ -361,7 +362,14 @@ static int ng_vboxnetflt_rcvdata(hook_p hook, item_p i | |||||
{ | { | ||||
if (mtag != NULL || !fActive) | if (mtag != NULL || !fActive) | ||||
{ | { | ||||
+#if __FreeBSD_version >= 1300049 | +#if __FreeBSD_version >= 1300049 | ||||
+ struct epoch_tracker et; | + struct epoch_tracker et; | ||||
+ NET_EPOCH_ENTER(et); | + NET_EPOCH_ENTER(et); | ||||
+#endif | +#endif | ||||
ether_demux(ifp, m); | ether_demux(ifp, m); | ||||
+#if __FreeBSD_version >= 1300049 | +#if __FreeBSD_version >= 1300049 | ||||
+ NET_EPOCH_EXIT(et); | + NET_EPOCH_EXIT(et); | ||||
+#endif | +#endif | ||||
if (fActive) | if (fActive) | ||||
vboxNetFltRelease(pThis, true /*fBusy*/); | vboxNetFltRelease(pThis, true /*fBusy*/); | ||||
VBOXCURVNET_RESTORE(); | VBOXCURVNET_RESTORE(); | ||||
@@ -436,6 +445,8 @@ static void vboxNetFltFreeBSDinput(void *arg, int pend | @@ -436,6 +444,8 @@ static void vboxNetFltFreeBSDinput(void *arg, int pend | ||||
struct ifnet *ifp = pThis->u.s.ifp; | struct ifnet *ifp = pThis->u.s.ifp; | ||||
unsigned int cSegs = 0; | unsigned int cSegs = 0; | ||||
bool fDropIt = false, fActive; | bool fDropIt = false, fActive; | ||||
+ bool is_vl_tagged = false; | + bool is_vl_tagged = false; | ||||
+ uint16_t vl_tag; | + uint16_t vl_tag; | ||||
PINTNETSG pSG; | PINTNETSG pSG; | ||||
VBOXCURVNET_SET(ifp->if_vnet); | VBOXCURVNET_SET(ifp->if_vnet); | ||||
@@ -448,6 +459,19 @@ static void vboxNetFltFreeBSDinput(void *arg, int pend | @@ -448,6 +458,19 @@ static void vboxNetFltFreeBSDinput(void *arg, int pend | ||||
if (m == NULL) | if (m == NULL) | ||||
break; | break; | ||||
+ /* Prepend a VLAN header for consumption by the virtual switch */ | + /* Prepend a VLAN header for consumption by the virtual switch */ | ||||
+ if (m->m_flags & M_VLANTAG) { | + if (m->m_flags & M_VLANTAG) { | ||||
+ vl_tag = m->m_pkthdr.ether_vtag; | + vl_tag = m->m_pkthdr.ether_vtag; | ||||
+ is_vl_tagged = true; | + is_vl_tagged = true; | ||||
+ | + | ||||
+ m = ether_vlanencap(m, m->m_pkthdr.ether_vtag); | + m = ether_vlanencap(m, m->m_pkthdr.ether_vtag); | ||||
+ if (m == NULL) { | + if (m == NULL) { | ||||
+ printf("vboxflt: unable to prepend VLAN header\n"); | + printf("vboxflt: unable to prepend VLAN header\n"); | ||||
+ break; | + break; | ||||
+ } | + } | ||||
+ m->m_flags &= ~M_VLANTAG; | + m->m_flags &= ~M_VLANTAG; | ||||
+ } | + } | ||||
+ | + | ||||
for (m0 = m; m0 != NULL; m0 = m0->m_next) | for (m0 = m; m0 != NULL; m0 = m0->m_next) | ||||
if (m0->m_len > 0) | if (m0->m_len > 0) | ||||
cSegs++; | cSegs++; | ||||
@@ -462,10 +486,39 @@ static void vboxNetFltFreeBSDinput(void *arg, int pend | @@ -462,10 +485,39 @@ static void vboxNetFltFreeBSDinput(void *arg, int pend | ||||
vboxNetFltFreeBSDMBufToSG(pThis, m, pSG, cSegs, 0); | vboxNetFltFreeBSDMBufToSG(pThis, m, pSG, cSegs, 0); | ||||
fDropIt = pThis->pSwitchPort->pfnRecv(pThis->pSwitchPort, NULL /* pvIf */, pSG, INTNETTRUNKDIR_WIRE); | fDropIt = pThis->pSwitchPort->pfnRecv(pThis->pSwitchPort, NULL /* pvIf */, pSG, INTNETTRUNKDIR_WIRE); | ||||
RTMemTmpFree(pSG); | RTMemTmpFree(pSG); | ||||
+ | + | ||||
+ /* Restore the VLAN flags before re-injecting the packet */ | + /* Restore the VLAN flags before re-injecting the packet */ | ||||
+ if (is_vl_tagged && !fDropIt) { | + if (is_vl_tagged && !fDropIt) { | ||||
+ struct ether_vlan_header *vl_hdr; | + struct ether_vlan_header *vl_hdr; | ||||
+ | + | ||||
Show All 24 Lines | +#endif | ||||
ether_demux(ifp, m); | ether_demux(ifp, m); | ||||
+#if __FreeBSD_version >= 1300049 | +#if __FreeBSD_version >= 1300049 | ||||
+ NET_EPOCH_EXIT(et); | + NET_EPOCH_EXIT(et); | ||||
+#endif | +#endif | ||||
+ } | + } | ||||
} | } | ||||
vboxNetFltRelease(pThis, true /* fBusy */); | vboxNetFltRelease(pThis, true /* fBusy */); | ||||
VBOXCURVNET_RESTORE(); | VBOXCURVNET_RESTORE(); | ||||
@@ -521,6 +574,7 @@ static void vboxNetFltFreeBSDoutput(void *arg, int pen | @@ -521,6 +573,7 @@ static void vboxNetFltFreeBSDoutput(void *arg, int pen | ||||
*/ | */ | ||||
int vboxNetFltPortOsXmit(PVBOXNETFLTINS pThis, void *pvIfData, PINTNETSG pSG, uint32_t fDst) | int vboxNetFltPortOsXmit(PVBOXNETFLTINS pThis, void *pvIfData, PINTNETSG pSG, uint32_t fDst) | ||||
{ | { | ||||
+ IPRT_FREEBSD_SAVE_EFL_AC(); | + IPRT_FREEBSD_SAVE_EFL_AC(); | ||||
NOREF(pvIfData); | NOREF(pvIfData); | ||||
void (*input_f)(struct ifnet *, struct mbuf *); | void (*input_f)(struct ifnet *, struct mbuf *); | ||||
@@ -537,10 +591,16 @@ int vboxNetFltPortOsXmit(PVBOXNETFLTINS pThis, void *p | @@ -537,10 +590,16 @@ int vboxNetFltPortOsXmit(PVBOXNETFLTINS pThis, void *p | ||||
{ | { | ||||
m = vboxNetFltFreeBSDSGMBufFromSG(pThis, pSG); | m = vboxNetFltFreeBSDSGMBufFromSG(pThis, pSG); | ||||
if (m == NULL) | if (m == NULL) | ||||
+ { | + { | ||||
+ IPRT_FREEBSD_RESTORE_EFL_AC(); | + IPRT_FREEBSD_RESTORE_EFL_AC(); | ||||
return VERR_NO_MEMORY; | return VERR_NO_MEMORY; | ||||
+ } | + } | ||||
m = m_pullup(m, ETHER_HDR_LEN); | m = m_pullup(m, ETHER_HDR_LEN); | ||||
if (m == NULL) | if (m == NULL) | ||||
+ { | + { | ||||
+ IPRT_FREEBSD_RESTORE_EFL_AC(); | + IPRT_FREEBSD_RESTORE_EFL_AC(); | ||||
return VERR_NO_MEMORY; | return VERR_NO_MEMORY; | ||||
+ } | + } | ||||
m->m_flags |= M_PKTHDR; | m->m_flags |= M_PKTHDR; | ||||
ether_output_frame(ifp, m); | ether_output_frame(ifp, m); | ||||
@@ -550,10 +610,16 @@ int vboxNetFltPortOsXmit(PVBOXNETFLTINS pThis, void *p | @@ -550,10 +609,16 @@ int vboxNetFltPortOsXmit(PVBOXNETFLTINS pThis, void *p | ||||
{ | { | ||||
m = vboxNetFltFreeBSDSGMBufFromSG(pThis, pSG); | m = vboxNetFltFreeBSDSGMBufFromSG(pThis, pSG); | ||||
if (m == NULL) | if (m == NULL) | ||||
+ { | + { | ||||
+ IPRT_FREEBSD_RESTORE_EFL_AC(); | + IPRT_FREEBSD_RESTORE_EFL_AC(); | ||||
return VERR_NO_MEMORY; | return VERR_NO_MEMORY; | ||||
+ } | + } | ||||
m = m_pullup(m, ETHER_HDR_LEN); | m = m_pullup(m, ETHER_HDR_LEN); | ||||
if (m == NULL) | if (m == NULL) | ||||
+ { | + { | ||||
+ IPRT_FREEBSD_RESTORE_EFL_AC(); | + IPRT_FREEBSD_RESTORE_EFL_AC(); | ||||
return VERR_NO_MEMORY; | return VERR_NO_MEMORY; | ||||
+ } | + } | ||||
/* | /* | ||||
* Delivering packets to the host will be captured by the | * Delivering packets to the host will be captured by the | ||||
* input hook. Tag the packet with a mbuf tag so that we | * input hook. Tag the packet with a mbuf tag so that we | ||||
@@ -564,6 +630,7 @@ int vboxNetFltPortOsXmit(PVBOXNETFLTINS pThis, void *p | @@ -564,6 +629,7 @@ int vboxNetFltPortOsXmit(PVBOXNETFLTINS pThis, void *p | ||||
if (mtag == NULL) | if (mtag == NULL) | ||||
{ | { | ||||
m_freem(m); | m_freem(m); | ||||
+ IPRT_FREEBSD_RESTORE_EFL_AC(); | + IPRT_FREEBSD_RESTORE_EFL_AC(); | ||||
return VERR_NO_MEMORY; | return VERR_NO_MEMORY; | ||||
} | } | ||||
@@ -574,6 +641,7 @@ int vboxNetFltPortOsXmit(PVBOXNETFLTINS pThis, void *p | @@ -574,6 +640,7 @@ int vboxNetFltPortOsXmit(PVBOXNETFLTINS pThis, void *p | ||||
ifp->if_input(ifp, m); | ifp->if_input(ifp, m); | ||||
} | } | ||||
VBOXCURVNET_RESTORE(); | VBOXCURVNET_RESTORE(); | ||||
+ IPRT_FREEBSD_RESTORE_EFL_AC(); | + IPRT_FREEBSD_RESTORE_EFL_AC(); | ||||
return VINF_SUCCESS; | return VINF_SUCCESS; | ||||
} | } | ||||
@@ -586,6 +654,7 @@ static bool vboxNetFltFreeBsdIsPromiscuous(PVBOXNETFLT | @@ -586,6 +653,7 @@ static bool vboxNetFltFreeBsdIsPromiscuous(PVBOXNETFLT | ||||
int vboxNetFltOsInitInstance(PVBOXNETFLTINS pThis, void *pvContext) | int vboxNetFltOsInitInstance(PVBOXNETFLTINS pThis, void *pvContext) | ||||
{ | { | ||||
+ IPRT_FREEBSD_SAVE_EFL_AC(); | + IPRT_FREEBSD_SAVE_EFL_AC(); | ||||
char nam[NG_NODESIZ]; | char nam[NG_NODESIZ]; | ||||
struct ifnet *ifp; | struct ifnet *ifp; | ||||
node_p node; | node_p node; | ||||
@@ -594,7 +663,10 @@ int vboxNetFltOsInitInstance(PVBOXNETFLTINS pThis, voi | @@ -594,7 +662,10 @@ int vboxNetFltOsInitInstance(PVBOXNETFLTINS pThis, voi | ||||
NOREF(pvContext); | NOREF(pvContext); | ||||
ifp = ifunit(pThis->szName); | ifp = ifunit(pThis->szName); | ||||
if (ifp == NULL) | if (ifp == NULL) | ||||
+ { | + { | ||||
+ IPRT_FREEBSD_RESTORE_EFL_AC(); | + IPRT_FREEBSD_RESTORE_EFL_AC(); | ||||
return VERR_INTNET_FLT_IF_NOT_FOUND; | return VERR_INTNET_FLT_IF_NOT_FOUND; | ||||
+ } | + } | ||||
/* Create a new netgraph node for this instance */ | /* Create a new netgraph node for this instance */ | ||||
if (ng_make_node_common(&ng_vboxnetflt_typestruct, &node) != 0) | if (ng_make_node_common(&ng_vboxnetflt_typestruct, &node) != 0) | ||||
@@ -638,12 +710,14 @@ int vboxNetFltOsInitInstance(PVBOXNETFLTINS pThis, voi | @@ -638,12 +709,14 @@ int vboxNetFltOsInitInstance(PVBOXNETFLTINS pThis, voi | ||||
vboxNetFltRelease(pThis, true /*fBusy*/); | vboxNetFltRelease(pThis, true /*fBusy*/); | ||||
} | } | ||||
VBOXCURVNET_RESTORE(); | VBOXCURVNET_RESTORE(); | ||||
+ IPRT_FREEBSD_RESTORE_EFL_AC(); | + IPRT_FREEBSD_RESTORE_EFL_AC(); | ||||
return VINF_SUCCESS; | return VINF_SUCCESS; | ||||
} | } | ||||
bool vboxNetFltOsMaybeRediscovered(PVBOXNETFLTINS pThis) | bool vboxNetFltOsMaybeRediscovered(PVBOXNETFLTINS pThis) | ||||
{ | { | ||||
+ IPRT_FREEBSD_SAVE_EFL_AC(); | + IPRT_FREEBSD_SAVE_EFL_AC(); | ||||
struct ifnet *ifp, *ifp0; | struct ifnet *ifp, *ifp0; | ||||
ifp = ASMAtomicUoReadPtrT(&pThis->u.s.ifp, struct ifnet *); | ifp = ASMAtomicUoReadPtrT(&pThis->u.s.ifp, struct ifnet *); | ||||
@@ -660,6 +734,7 @@ bool vboxNetFltOsMaybeRediscovered(PVBOXNETFLTINS pThi | @@ -660,6 +733,7 @@ bool vboxNetFltOsMaybeRediscovered(PVBOXNETFLTINS pThi | ||||
pThis->u.s.node = NULL; | pThis->u.s.node = NULL; | ||||
} | } | ||||
VBOXCURVNET_RESTORE(); | VBOXCURVNET_RESTORE(); | ||||
+ IPRT_FREEBSD_RESTORE_EFL_AC(); | + IPRT_FREEBSD_RESTORE_EFL_AC(); | ||||
if (ifp0 != NULL) | if (ifp0 != NULL) | ||||
{ | { | ||||
@@ -672,6 +747,7 @@ bool vboxNetFltOsMaybeRediscovered(PVBOXNETFLTINS pThi | @@ -672,6 +746,7 @@ bool vboxNetFltOsMaybeRediscovered(PVBOXNETFLTINS pThi | ||||
void vboxNetFltOsDeleteInstance(PVBOXNETFLTINS pThis) | void vboxNetFltOsDeleteInstance(PVBOXNETFLTINS pThis) | ||||
{ | { | ||||
+ IPRT_FREEBSD_SAVE_EFL_AC(); | + IPRT_FREEBSD_SAVE_EFL_AC(); | ||||
taskqueue_drain(taskqueue_fast, &pThis->u.s.tskin); | taskqueue_drain(taskqueue_fast, &pThis->u.s.tskin); | ||||
taskqueue_drain(taskqueue_fast, &pThis->u.s.tskout); | taskqueue_drain(taskqueue_fast, &pThis->u.s.tskout); | ||||
@@ -684,6 +760,7 @@ void vboxNetFltOsDeleteInstance(PVBOXNETFLTINS pThis) | @@ -684,6 +759,7 @@ void vboxNetFltOsDeleteInstance(PVBOXNETFLTINS pThis) | ||||
ng_rmnode_self(pThis->u.s.node); | ng_rmnode_self(pThis->u.s.node); | ||||
VBOXCURVNET_RESTORE(); | VBOXCURVNET_RESTORE(); | ||||
pThis->u.s.node = NULL; | pThis->u.s.node = NULL; | ||||
+ IPRT_FREEBSD_RESTORE_EFL_AC(); | + IPRT_FREEBSD_RESTORE_EFL_AC(); | ||||
} | } | ||||
int vboxNetFltOsPreInitInstance(PVBOXNETFLTINS pThis) | int vboxNetFltOsPreInitInstance(PVBOXNETFLTINS pThis) | ||||
@@ -697,6 +774,7 @@ int vboxNetFltOsPreInitInstance(PVBOXNETFLTINS pThis) | @@ -697,6 +773,7 @@ int vboxNetFltOsPreInitInstance(PVBOXNETFLTINS pThis) | ||||
void vboxNetFltPortOsSetActive(PVBOXNETFLTINS pThis, bool fActive) | void vboxNetFltPortOsSetActive(PVBOXNETFLTINS pThis, bool fActive) | ||||
{ | { | ||||
+ IPRT_FREEBSD_SAVE_EFL_AC(); | + IPRT_FREEBSD_SAVE_EFL_AC(); | ||||
struct ifnet *ifp; | struct ifnet *ifp; | ||||
struct ifreq ifreq; | struct ifreq ifreq; | ||||
int error; | int error; | ||||
@@ -730,7 +808,10 @@ void vboxNetFltPortOsSetActive(PVBOXNETFLTINS pThis, b | @@ -730,7 +807,10 @@ void vboxNetFltPortOsSetActive(PVBOXNETFLTINS pThis, b | ||||
NG_MKMESSAGE(msg, NGM_GENERIC_COOKIE, NGM_CONNECT, | NG_MKMESSAGE(msg, NGM_GENERIC_COOKIE, NGM_CONNECT, | ||||
sizeof(struct ngm_connect), M_NOWAIT); | sizeof(struct ngm_connect), M_NOWAIT); | ||||
if (msg == NULL) | if (msg == NULL) | ||||
+ { | + { | ||||
+ IPRT_FREEBSD_RESTORE_EFL_AC(); | + IPRT_FREEBSD_RESTORE_EFL_AC(); | ||||
return; | return; | ||||
+ } | + } | ||||
con = (struct ngm_connect *)msg->data; | con = (struct ngm_connect *)msg->data; | ||||
snprintf(con->path, NG_PATHSIZ, "vboxnetflt_%s:", ifp->if_xname); | snprintf(con->path, NG_PATHSIZ, "vboxnetflt_%s:", ifp->if_xname); | ||||
strlcpy(con->ourhook, "lower", NG_HOOKSIZ); | strlcpy(con->ourhook, "lower", NG_HOOKSIZ); | ||||
@@ -744,7 +825,10 @@ void vboxNetFltPortOsSetActive(PVBOXNETFLTINS pThis, b | @@ -744,7 +824,10 @@ void vboxNetFltPortOsSetActive(PVBOXNETFLTINS pThis, b | ||||
NG_MKMESSAGE(msg, NGM_GENERIC_COOKIE, NGM_CONNECT, | NG_MKMESSAGE(msg, NGM_GENERIC_COOKIE, NGM_CONNECT, | ||||
sizeof(struct ngm_connect), M_NOWAIT); | sizeof(struct ngm_connect), M_NOWAIT); | ||||
if (msg == NULL) | if (msg == NULL) | ||||
+ { | + { | ||||
+ IPRT_FREEBSD_RESTORE_EFL_AC(); | + IPRT_FREEBSD_RESTORE_EFL_AC(); | ||||
return; | return; | ||||
+ } | + } | ||||
con = (struct ngm_connect *)msg->data; | con = (struct ngm_connect *)msg->data; | ||||
snprintf(con->path, NG_PATHSIZ, "vboxnetflt_%s:", | snprintf(con->path, NG_PATHSIZ, "vboxnetflt_%s:", | ||||
ifp->if_xname); | ifp->if_xname); | ||||
@@ -767,7 +851,10 @@ void vboxNetFltPortOsSetActive(PVBOXNETFLTINS pThis, b | @@ -767,7 +850,10 @@ void vboxNetFltPortOsSetActive(PVBOXNETFLTINS pThis, b | ||||
NG_MKMESSAGE(msg, NGM_GENERIC_COOKIE, NGM_RMHOOK, | NG_MKMESSAGE(msg, NGM_GENERIC_COOKIE, NGM_RMHOOK, | ||||
sizeof(struct ngm_rmhook), M_NOWAIT); | sizeof(struct ngm_rmhook), M_NOWAIT); | ||||
if (msg == NULL) | if (msg == NULL) | ||||
+ { | + { | ||||
+ IPRT_FREEBSD_RESTORE_EFL_AC(); | + IPRT_FREEBSD_RESTORE_EFL_AC(); | ||||
return; | return; | ||||
+ } | + } | ||||
rm = (struct ngm_rmhook *)msg->data; | rm = (struct ngm_rmhook *)msg->data; | ||||
strlcpy(rm->ourhook, "input", NG_HOOKSIZ); | strlcpy(rm->ourhook, "input", NG_HOOKSIZ); | ||||
NG_SEND_MSG_PATH(error, node, msg, path, 0); | NG_SEND_MSG_PATH(error, node, msg, path, 0); | ||||
@@ -778,12 +865,16 @@ void vboxNetFltPortOsSetActive(PVBOXNETFLTINS pThis, b | @@ -778,12 +864,16 @@ void vboxNetFltPortOsSetActive(PVBOXNETFLTINS pThis, b | ||||
NG_MKMESSAGE(msg, NGM_GENERIC_COOKIE, NGM_RMHOOK, | NG_MKMESSAGE(msg, NGM_GENERIC_COOKIE, NGM_RMHOOK, | ||||
sizeof(struct ngm_rmhook), M_NOWAIT); | sizeof(struct ngm_rmhook), M_NOWAIT); | ||||
if (msg == NULL) | if (msg == NULL) | ||||
+ { | + { | ||||
+ IPRT_FREEBSD_RESTORE_EFL_AC(); | + IPRT_FREEBSD_RESTORE_EFL_AC(); | ||||
return; | return; | ||||
+ } | + } | ||||
rm = (struct ngm_rmhook *)msg->data; | rm = (struct ngm_rmhook *)msg->data; | ||||
strlcpy(rm->ourhook, "output", NG_HOOKSIZ); | strlcpy(rm->ourhook, "output", NG_HOOKSIZ); | ||||
NG_SEND_MSG_PATH(error, node, msg, path, 0); | NG_SEND_MSG_PATH(error, node, msg, path, 0); | ||||
} | } | ||||
VBOXCURVNET_RESTORE(); | VBOXCURVNET_RESTORE(); | ||||
+ IPRT_FREEBSD_RESTORE_EFL_AC(); | + IPRT_FREEBSD_RESTORE_EFL_AC(); | ||||
} | } | ||||
int vboxNetFltOsDisconnectIt(PVBOXNETFLTINS pThis) | int vboxNetFltOsDisconnectIt(PVBOXNETFLTINS pThis) |