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

Eitan Eliahu eliahue at vmware.com
Fri Aug 1 07:05:29 UTC 2014


BSOD while setting AllowManagementOS on $false #13
https://github.com/openvswitch/ovs/issues/13

Signed-off-by: Eitan Eliahu <eliahue at vmware.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..62a98fa 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) {
+        ASSERT(ovsFwdCtx->switchContext->internalVport);
+        OvsCompleteNBLForwardingCtx(ovsFwdCtx,
+                                    L"OVS-Dropped - internal port removed");
+        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