While investigating a kernel panic, our team noticed that UDP traffic recieved by an STT tunnel will always have a gso_type set as SKB_GSO_UDP. After decap, we also noticed that traffic that had this flag set had its fragmentation type set as OVS_FRAG_TYPE_FIRST during key extraction.
When the connection tracker encounters this, it assumes it's already dealing with fragmented traffic, which might not be the case. This patch simply ensures we're dealing with an actual fragment before sending the skb off to be reassembled. Reported-by: Johannes Erdfelt <[email protected]> Reported-at: https://mail.openvswitch.org/pipermail/ovs-discuss/2018-May/046800.html Signed-off-by: Neal Shrader <[email protected]> --- datapath/conntrack.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/datapath/conntrack.c b/datapath/conntrack.c index e53b8e3..04dbeb4 100644 --- a/datapath/conntrack.c +++ b/datapath/conntrack.c @@ -1187,9 +1187,18 @@ int ovs_ct_execute(struct net *net, struct sk_buff *skb, return err; if (key->ip.frag != OVS_FRAG_TYPE_NONE) { - err = handle_fragments(net, key, info->zone.id, skb); - if (err) - return err; + bool real_fragment = true; + +#ifdef HAVE_SKB_GSO_UDP + if (skb_shinfo(skb)->gso_type & SKB_GSO_UDP) + real_fragment = !!(ip_hdr(skb)->frag_off & htons(IP_OFFSET | IP_MF)); +#endif + + if (real_fragment) { + err = handle_fragments(net, key, info->zone.id, skb); + if (err) + return err; + } } if (info->commit) -- 2.7.4 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
