datapath: Check gso_type for correct sk_buff in queue_gso_packets().
authorBen Pfaff <blp@nicira.com>
Tue, 10 Jul 2012 21:11:59 +0000 (14:11 -0700)
committerBen Pfaff <blp@nicira.com>
Tue, 10 Jul 2012 22:21:46 +0000 (15:21 -0700)
commitd4cba1f88be38ac31a8a43a01d40d35dd0bf2ca1
tree488800104421d1fa9d546189b0c8cba8156b346b
parentfd0ca62bb10b92ba383f2ee6aa51863273bb38ff
datapath: Check gso_type for correct sk_buff in queue_gso_packets().

At the point where it was used, skb_shinfo(skb)->gso_type referred to a
post-GSO sk_buff.  Thus, it would always be 0.  We want to know the pre-GSO
gso_type, so we need to obtain it before segmenting.

Before this change, the kernel would pass inconsistent data to userspace:
packets for UDP fragments with nonzero offset would be passed along with
flow keys that indicate a zero offset (that is, the flow key for "later"
fragments claimed to be "first" fragments).  This inconsistency tended
to confuse Open vSwitch userspace, causing it to log messages about
"failed to flow_del" the flows with "later" fragments.

Bug #12394.
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
datapath/datapath.c