[ovs-dev] [PATCH branch-2.8 2/2] datapath: Clear the L4 portion of the key for "later" fragments

Justin Pettit jpettit at ovn.org
Thu Aug 29 22:25:41 UTC 2019


> On Aug 29, 2019, at 10:55 AM, Greg Rose <gvrose8192 at gmail.com> wrote:
> 
> diff --git a/datapath/flow.c b/datapath/flow.c
> index 083288f..92fc6ac 100644
> --- a/datapath/flow.c
> +++ b/datapath/flow.c
> @@ -529,6 +529,7 @@ static int key_extract_l3l4(struct sk_buff *skb, struct sw_flow_key *key)
> 		offset = nh->frag_off & htons(IP_OFFSET);
> 		if (offset) {
> 			key->ip.frag = OVS_FRAG_TYPE_LATER;
> +			memset(&key->tp, 0, sizeof(key->tp));
> 			return 0;
> 		}
> 		if (nh->frag_off & htons(IP_MF) ||
> @@ -647,8 +648,11 @@ static int key_extract_l3l4(struct sk_buff *skb, struct sw_flow_key *key)
> 			return error;
> 		}
> 
> -		if (key->ip.frag == OVS_FRAG_TYPE_LATER)
> +		if (key->ip.frag == OVS_FRAG_TYPE_LATER) {
> +			memset(&key->tp, 0, sizeof(key->tp));
> 			return 0;
> +		}
> +#ifdef HAVE_SKB_GSO_UDP

My system's kernel is too new to be built against an OVS this old, but I noticed this patch for OVS versions 2.5 through 2.9 introduce this #ifdef without a corresponding #endif.  Was this intentional?  Does it even build?

--Justin




More information about the dev mailing list