Revert "net: ipv4: ip_forward: fix inverted local_df test"
authorBen Hutchings <ben@decadent.org.uk>
Fri, 11 Jul 2014 19:01:52 +0000 (20:01 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 6 Aug 2014 17:07:31 +0000 (18:07 +0100)
This reverts commit 59d9f389df3cdf72833d5ee17c3fe959b6bdc792, which
was commit ca6c5d4ad216d5942ae544bbf02503041bd802aa upstream.  It is a
valid fix, but depends on sk_buff::local_df being set in all the right
cases, which it wasn't in 3.2.  We need to defer it unless and until
the other fixes are also backported to 3.2.y.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
net/ipv4/ip_forward.c

index 7593f3a..e0d9f02 100644 (file)
 static bool ip_may_fragment(const struct sk_buff *skb)
 {
        return unlikely((ip_hdr(skb)->frag_off & htons(IP_DF)) == 0) ||
-               skb->local_df;
+              !skb->local_df;
 }
 
 static bool ip_exceeds_mtu(const struct sk_buff *skb, unsigned int mtu)
 {
-       if (skb->len <= mtu)
+       if (skb->len <= mtu || skb->local_df)
                return false;
 
        if (skb_is_gso(skb) && skb_gso_network_seglen(skb) <= mtu)