net: ipv4: ip_forward: fix inverted local_df test
[firefly-linux-kernel-4.4.55.git] / net / ipv4 / ip_forward.c
index be8abe73bb9f464a2e68679255acde3b708ce84b..c29ae8371e44b7215a271c4e95de2282ac787b27 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 || skb->local_df)
+       if (skb->len <= mtu)
                return false;
 
        if (skb_is_gso(skb) && skb_gso_network_seglen(skb) <= mtu)