datapath-windows: Wrong cleanup of newly created multiple NBLs
authorSorin Vinturis <svinturis@cloudbasesolutions.com>
Wed, 24 Jun 2015 10:56:55 +0000 (10:56 +0000)
committerBen Pfaff <blp@nicira.com>
Wed, 24 Jun 2015 17:59:57 +0000 (10:59 -0700)
Bug found in OvsPartialCopyToMultipleNBLs function in the cleanup part of
the code. Before completing the current NBL (newNbl) the NEXT link for the
following NBL (firstNbl) was broken, instead of the current one (newNbl).

Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com>
Reported-by: Sorin Vinturis <svinturis@cloudbasesolutions.com>
Reported-at: https://github.com/openvswitch/ovs-issues/issues/87
Acked-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
datapath-windows/ovsext/BufferMgmt.c

index 5adbb25..83d6cde 100644 (file)
@@ -881,7 +881,7 @@ cleanup:
     newNbl = firstNbl;
     while (newNbl) {
         firstNbl = NET_BUFFER_LIST_NEXT_NBL(newNbl);
-        NET_BUFFER_LIST_NEXT_NBL(firstNbl) = NULL;
+        NET_BUFFER_LIST_NEXT_NBL(newNbl) = NULL;
         OvsCompleteNBL(context, newNbl, TRUE);
         newNbl = firstNbl;
     }