[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOrHB_AU1gQ74L5WawyA4THhh=MG8YZhcvkkxnKgRG+5m-436g@mail.gmail.com>
Date: Sun, 25 Aug 2019 09:54:47 -0700
From: Pravin Shelar <pshelar@....org>
To: Justin Pettit <jpettit@....org>
Cc: Linux Kernel Network Developers <netdev@...r.kernel.org>,
Joe Stringer <joe@...d.net.nz>
Subject: Re: [PATCH net 1/2] openvswitch: Properly set L4 keys on "later" IP fragments.
On Sat, Aug 24, 2019 at 9:58 AM Justin Pettit <jpettit@....org> wrote:
>
> When IP fragments are reassembled before being sent to conntrack, the
> key from the last fragment is used. Unless there are reordering
> issues, the last fragment received will not contain the L4 ports, so the
> key for the reassembled datagram won't contain them. This patch updates
> the key once we have a reassembled datagram.
>
> Signed-off-by: Justin Pettit <jpettit@....org>
> ---
> net/openvswitch/conntrack.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c
> index 848c6eb55064..f40ad2a42086 100644
> --- a/net/openvswitch/conntrack.c
> +++ b/net/openvswitch/conntrack.c
> @@ -524,6 +524,10 @@ static int handle_fragments(struct net *net, struct sw_flow_key *key,
> return -EPFNOSUPPORT;
> }
>
> + /* The key extracted from the fragment that completed this datagram
> + * likely didn't have an L4 header, so regenerate it. */
> + ovs_flow_key_update(skb, key);
> +
> key->ip.frag = OVS_FRAG_TYPE_NONE;
> skb_clear_hash(skb);
> skb->ignore_df = 1;
> --
Looks good to me.
Acked-by: Pravin B Shelar <pshelar@....org>
Thanks,
Pravin.
Powered by blists - more mailing lists