[ovs-dev] [PATCH] datapath-windows - fix crash when internal port is removed

Eitan Eliahu eliahue at vmware.com
Sat Aug 2 00:11:51 UTC 2014


BSOD while setting AllowManagementOS on $false #13
Github Issue: #13

Signed-off-by: Eitan Eliahu <eliahue at vmware.com>
Reported-by: Alin Serdean <aserdean at cloudbasesolutions.com>
---
 datapath-windows/ovsext/OvsActions.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/datapath-windows/ovsext/OvsActions.c b/datapath-windows/ovsext/OvsActions.c
index 79fb50f..4a2c117 100644
--- a/datapath-windows/ovsext/OvsActions.c
+++ b/datapath-windows/ovsext/OvsActions.c
@@ -581,7 +581,12 @@ OvsTunnelPortTx(OvsForwardingContext *ovsFwdCtx)
      * Setup the source port to be the internal port to as to facilitate the
      * second OvsLookupFlow.
      */
-    ASSERT(ovsFwdCtx->switchContext->internalVport);
+    if (ovsFwdCtx->switchContext->internalVport == NULL) {
+        OvsClearTunTxCtx(ovsFwdCtx);
+        OvsCompleteNBLForwardingCtx(ovsFwdCtx,
+            L"OVS-Dropped since internal port is absent");
+        return NDIS_STATUS_FAILURE;
+    }
     ovsFwdCtx->srcVportNo =
         ((POVS_VPORT_ENTRY)ovsFwdCtx->switchContext->internalVport)->portNo;
 
-- 
1.9.4.msysgit.0




More information about the dev mailing list