From: Ben Hutchings Date: Fri, 11 Jul 2014 19:01:52 +0000 (+0100) Subject: Revert "net: ipv4: ip_forward: fix inverted local_df test" X-Git-Tag: v3.2.64~330 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=commitdiff_plain;h=8bbfe822fbadf05ff84a057bde1e59c198e24aa0 Revert "net: ipv4: ip_forward: fix inverted local_df test" 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 --- diff --git a/net/ipv4/ip_forward.c b/net/ipv4/ip_forward.c index 7593f3a46035..e0d9f02fec11 100644 --- a/net/ipv4/ip_forward.c +++ b/net/ipv4/ip_forward.c @@ -42,12 +42,12 @@ 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)