diff options
Diffstat (limited to 'datapath-windows/ovsext/Switch.c')
-rw-r--r-- | datapath-windows/ovsext/Switch.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/datapath-windows/ovsext/Switch.c b/datapath-windows/ovsext/Switch.c index 99a306d26..f176fa09f 100644 --- a/datapath-windows/ovsext/Switch.c +++ b/datapath-windows/ovsext/Switch.c @@ -46,7 +46,7 @@ extern PDEVICE_OBJECT gOvsDeviceObject; * Reference count used to prevent premature deallocation of the global switch * context structure, gOvsSwitchContext. */ -volatile LONG gOvsSwitchContextRefCount = 1; +volatile LONG gOvsSwitchContextRefCount = 0; static NDIS_STATUS OvsCreateSwitch(NDIS_HANDLE ndisFilterHandle, POVS_SWITCH_CONTEXT *switchContextOut); @@ -137,6 +137,7 @@ OvsExtAttach(NDIS_HANDLE ndisFilterHandle, switchContext->controlFlowState = OvsSwitchAttached; switchContext->dataFlowState = OvsSwitchPaused; + gOvsSwitchContextRefCount = 1; gOvsSwitchContext = switchContext; KeMemoryBarrier(); |