diff options
author | Alin Serdean <aserdean@cloudbasesolutions.com> | 2015-01-05 19:17:01 +0000 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2015-01-06 09:05:03 -0800 |
commit | c598aa63c5711a766cf7f82474ab60e4e7d87019 (patch) | |
tree | a86273c0b2832f7057de142a20e98724a9725b44 /datapath-windows | |
parent | be92b251bc578c8bbfdc88401a27c0343a144a80 (diff) | |
download | openvswitch-c598aa63c5711a766cf7f82474ab60e4e7d87019.tar.gz |
datapath-windows: set the nlBuf tail properly
Move the the tail of the netlink buffer accordingly to the input data.
Currently _MapFlowStatsToNlStats overrides the netlink header information.
Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'datapath-windows')
-rw-r--r-- | datapath-windows/ovsext/Flow.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/datapath-windows/ovsext/Flow.c b/datapath-windows/ovsext/Flow.c index 044fde57c..d3de8cc45 100644 --- a/datapath-windows/ovsext/Flow.c +++ b/datapath-windows/ovsext/Flow.c @@ -433,6 +433,7 @@ _FlowNlGetCmdHandler(POVS_USER_PARAMS_CONTEXT usrParamsCtx, RtlZeroMemory(&getOutput, sizeof(OvsFlowGetOutput)); UINT32 keyAttrOffset = 0; UINT32 tunnelKeyAttrOffset = 0; + BOOLEAN ok; if (usrParamsCtx->inputLength > usrParamsCtx->outputLength) { /* Should not be the case. @@ -506,8 +507,12 @@ _FlowNlGetCmdHandler(POVS_USER_PARAMS_CONTEXT usrParamsCtx, /* Input already has all the attributes for the flow key. * Lets copy the values back. */ - RtlCopyMemory(usrParamsCtx->outputBuffer, usrParamsCtx->inputBuffer, - usrParamsCtx->inputLength); + ok = NlMsgPutTail(&nlBuf, (PCHAR)(usrParamsCtx->inputBuffer), + usrParamsCtx->inputLength); + if (!ok) { + OVS_LOG_ERROR("Could not copy the data to the buffer tail"); + goto done; + } rc = _MapFlowStatsToNlStats(&nlBuf, &((getOutput.info).stats)); if (rc != STATUS_SUCCESS) { |