diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-11-27 13:41:11 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-11-27 13:41:11 +0100 |
commit | 3fb42daaf11c4be8e0626b733916f3a7b65bcfae (patch) | |
tree | d40ab1904047d2db03c9f6e9b538e01d62415646 /net/ipv4/raw.c | |
parent | efdbe3c3edb6c8c98a8be863f60916780a5375c1 (diff) | |
parent | 06a691e64b11323a735db3c3bd909d3c0712698f (diff) |
Merge branch 'for-linus' into for-next
Diffstat (limited to 'net/ipv4/raw.c')
-rw-r--r-- | net/ipv4/raw.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index 8c0d0bdc2a7c..63e5be0abd86 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c @@ -406,10 +406,12 @@ static int raw_send_hdrinc(struct sock *sk, struct flowi4 *fl4, ip_select_ident(net, skb, NULL); iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); + skb->transport_header += iphlen; + if (iph->protocol == IPPROTO_ICMP && + length >= iphlen + sizeof(struct icmphdr)) + icmp_out_count(net, ((struct icmphdr *) + skb_transport_header(skb))->type); } - if (iph->protocol == IPPROTO_ICMP) - icmp_out_count(net, ((struct icmphdr *) - skb_transport_header(skb))->type); err = NF_HOOK(NFPROTO_IPV4, NF_INET_LOCAL_OUT, net, sk, skb, NULL, rt->dst.dev, |