summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2014-07-11 20:01:52 +0100
committerBen Hutchings <ben@decadent.org.uk>2014-08-06 18:07:31 +0100
commit8bbfe822fbadf05ff84a057bde1e59c198e24aa0 (patch)
tree7f17935c74957ffa8eef534ed484d206df32759c /net
parente9b1a5ca4be235d1eef84c754f78f53b1ca1a242 (diff)
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 <ben@decadent.org.uk>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/ip_forward.c4
1 files changed, 2 insertions, 2 deletions
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)