ipv4: Set skb->protocol properly for local output
[firefly-linux-kernel-4.4.55.git] / net / ipv4 / ip_output.c
index f2ad5216c438006e5f62a862913895bd04f2126a..2b7283303650ae9a833582e38908c3a1dca9dae0 100644 (file)
@@ -102,6 +102,9 @@ int __ip_local_out(struct net *net, struct sock *sk, struct sk_buff *skb)
 
        iph->tot_len = htons(skb->len);
        ip_send_check(iph);
+
+       skb->protocol = htons(ETH_P_IP);
+
        return nf_hook(NFPROTO_IPV4, NF_INET_LOCAL_OUT,
                       net, sk, skb, NULL, skb_dst(skb)->dev,
                       dst_output);