On 5/4/26 11:19 AM, Naveen Yerramneni wrote:
> clone_xlate_actions() has two code paths.  The non-reversible path
> saves and restores ctx->conntracked across the inner actions, but
> the reversible path does not.
> 
> This is a problem for flows like:
>     clone(ct_clear, <actions>), ct_clear, resubmit(,N)
> 
> The ct_clear inside the clone sets ctx->conntracked to false.  After
> the clone returns, the flag stays false but flow.ct_state is
> restored by xretain_state_restore_and_free().  The ct_clear that
> follows the clone then does nothing, because OFPACT_CT_CLEAR runs
> only when ctx->conntracked is true.  The original packet keeps its
> old ct_state, and the ct_clear did not take effect.
> 
> Move OFPACT_CT_CLEAR to the non-reversible list so clone(ct_clear,
> <actions>) goes through the path that wraps the inner actions in a
> datapath clone and properly isolates ctx->conntracked from the
> outer context.
> 
> Test added in tests/ofproto-dpif.at.
> 
> Fixes: 1fe178d251c8 ("dpif: Add support for OVS_ACTION_ATTR_CT_CLEAR")
> Reported-by: Ashwin Balaji S <[email protected]>
> Signed-off-by: Naveen Yerramneni <[email protected]>
> ---
> v2:
>   - Addressed review comments from Ilya Maximets.
> ---
>  ofproto/ofproto-dpif-xlate.c |  2 +-
>  tests/ofproto-dpif.at        | 24 ++++++++++++++++++++++++
>  2 files changed, 25 insertions(+), 1 deletion(-)

Thanks, Naveen!

I added a small note about this action being actually non-reversible
into the commit message, fixed a couple small style issues in the test
and applied the patch.  Backported down to 3.3.

Best regards, Ilya Maximets.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to