summaryrefslogtreecommitdiff
path: root/datapath-windows/ovsext/Actions.c
diff options
context:
space:
mode:
authorSairam Venugopal <vsairam@vmware.com>2016-04-26 16:53:30 -0700
committerBen Pfaff <blp@ovn.org>2016-04-27 06:23:48 -0700
commitac93328273238b5dc86353222264fa4f30ad95e8 (patch)
tree491ddba392161963421cec1005ac059deb928dbb /datapath-windows/ovsext/Actions.c
parentd291a10c50434707405d8cd1437ec62e10c43bb5 (diff)
downloadopenvswitch-ac93328273238b5dc86353222264fa4f30ad95e8.tar.gz
datapath-windows: Fix recirculation when it is not the last attribute
When the recirc action is in middle, the current code creates a clone of the NBL. However, it overwrites the pointer to point to the cloned NBL without completing it. This causes a memory leak that crashes the kernel. Signed-off-by: Sairam Venugopal <vsairam@vmware.com> Acked-by: Nithin Raju <nithin@vmware.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'datapath-windows/ovsext/Actions.c')
-rw-r--r--datapath-windows/ovsext/Actions.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/datapath-windows/ovsext/Actions.c b/datapath-windows/ovsext/Actions.c
index 5dae6b43d..5ad29ee60 100644
--- a/datapath-windows/ovsext/Actions.c
+++ b/datapath-windows/ovsext/Actions.c
@@ -1557,10 +1557,14 @@ OvsExecuteRecirc(OvsForwardingContext *ovsFwdCtx,
ovsActionStats.noCopiedNbl++;
return NDIS_STATUS_SUCCESS;
}
- ovsFwdCtx->curNbl = newNbl;
}
- deferredAction = OvsAddDeferredActions(ovsFwdCtx->curNbl, key, NULL);
+ if (newNbl) {
+ deferredAction = OvsAddDeferredActions(newNbl, key, NULL);
+ } else {
+ deferredAction = OvsAddDeferredActions(ovsFwdCtx->curNbl, key, NULL);
+ }
+
if (deferredAction) {
deferredAction->key.recircId = NlAttrGetU32(actions);
} else {