diff options
author | Anand Kumar <kumaranand@vmware.com> | 2017-05-04 15:12:51 -0700 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2017-05-08 10:01:18 -0400 |
commit | 45bde0177ad31571e2d4bb5d98b616ddc6131fab (patch) | |
tree | 4ae2d2868960f924cb618165c37b337e02893ddc /datapath-windows/ovsext/Actions.c | |
parent | 0b5166dca34e6d16c09fa3657779a1a9863b77a9 (diff) | |
download | openvswitch-45bde0177ad31571e2d4bb5d98b616ddc6131fab.tar.gz |
datapath-windows: Added Ipv4 fragments support in Conntrack
This patch adds support for tracking Ipv4 fragments in conntrack module.
Individual fragments are not tracked and are consumed by the
fragmentation/reassembly. Only the reassembled Ipv4 datagram is tracked and
treated as a single ct entry.
Signed-off-by: Anand Kumar <kumaranand@vmware.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Diffstat (limited to 'datapath-windows/ovsext/Actions.c')
-rw-r--r-- | datapath-windows/ovsext/Actions.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/datapath-windows/ovsext/Actions.c b/datapath-windows/ovsext/Actions.c index 3bd00a727..b5c13c75b 100644 --- a/datapath-windows/ovsext/Actions.c +++ b/datapath-windows/ovsext/Actions.c @@ -1975,12 +1975,29 @@ OvsDoExecuteActions(POVS_SWITCH_CONTEXT switchContext, } } + PNET_BUFFER_LIST oldNbl = ovsFwdCtx.curNbl; status = OvsExecuteConntrackAction(&ovsFwdCtx, key, (const PNL_ATTR)a); if (status != NDIS_STATUS_SUCCESS) { - OVS_LOG_ERROR("CT Action failed"); - dropReason = L"OVS-conntrack action failed"; + /* Pending NBLs are consumed by Defragmentation. */ + if (status != NDIS_STATUS_PENDING) { + OVS_LOG_ERROR("CT Action failed"); + dropReason = L"OVS-conntrack action failed"; + } goto dropit; + } else if (oldNbl != ovsFwdCtx.curNbl) { + /* + * OvsIpv4Reassemble consumes the original NBL and creates a + * new one and assigns it to the curNbl of ovsFwdCtx. + */ + OvsInitForwardingCtx(&ovsFwdCtx, + ovsFwdCtx.switchContext, + ovsFwdCtx.curNbl, + ovsFwdCtx.srcVportNo, + ovsFwdCtx.sendFlags, + NET_BUFFER_LIST_SWITCH_FORWARDING_DETAIL(ovsFwdCtx.curNbl), + ovsFwdCtx.completionList, + &ovsFwdCtx.layers, FALSE); } break; } |