datapath-windows: Don't leak NBLs with multiple NBs.
authorNithin Raju <nithin@vmware.com>
Thu, 30 Oct 2014 20:17:43 +0000 (13:17 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 31 Oct 2014 20:54:52 +0000 (13:54 -0700)
Currently, if we receive an NBL with multiple NBs from NDIS, we just
ASSERT() and not do anything. The right thing to do obviously is to
process the NBL. This is a work in progress.

In the meantime, we should complete the NBL and not just leak it.

Signed-off-by: Nithin Raju <nithin@vmware.com>
Acked-by: Eitan Eliahu <eliahue@vmware.com>
Tested-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
datapath-windows/ovsext/PacketIO.c

index 5223125..1af391b 100644 (file)
@@ -218,7 +218,12 @@ OvsStartNBLIngress(POVS_SWITCH_CONTEXT switchContext,
         curNb = NET_BUFFER_LIST_FIRST_NB(curNbl);
         if (curNb->Next != NULL) {
             /* XXX: This case is not handled yet. */
-            ASSERT(FALSE);
+            RtlInitUnicodeString(&filterReason,
+                L"Dropping NBLs with multiple NBs");
+            OvsStartNBLIngressError(switchContext, curNbl,
+                                    sendCompleteFlags, &filterReason,
+                                    NDIS_STATUS_RESOURCES);
+            continue;
         } else {
             POVS_BUFFER_CONTEXT ctx;
             OvsFlow *flow;