Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 315158
b: refs/heads/master
c: f0a70e9
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Jul 12, 2012
1 parent 2ac3ad2 commit 70e20f1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 065f5f9749202cf91dae6f39ad7e9fe8801023b5
refs/heads/master: f0a70e902f483295a8b6d74ef4393bc577b703d7
12 changes: 6 additions & 6 deletions trunk/net/ipv4/icmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,12 @@ static void icmp_socket_deliver(struct sk_buff *skb, u32 info)
const struct net_protocol *ipprot;
int protocol = iph->protocol;

/* Checkin full IP header plus 8 bytes of protocol to
* avoid additional coding at protocol handlers.
*/
if (!pskb_may_pull(skb, iph->ihl * 4 + 8))
return;

raw_icmp_error(skb, protocol, info);

rcu_read_lock();
Expand Down Expand Up @@ -733,12 +739,6 @@ static void icmp_unreach(struct sk_buff *skb)
goto out;
}

/* Checkin full IP header plus 8 bytes of protocol to
* avoid additional coding at protocol handlers.
*/
if (!pskb_may_pull(skb, iph->ihl * 4 + 8))
goto out;

icmp_socket_deliver(skb, info);

out:
Expand Down

0 comments on commit 70e20f1

Please sign in to comment.