diff options
Diffstat (limited to 'net/ipv4/ip_gre.c')
-rw-r--r-- | net/ipv4/ip_gre.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index 969fe31723a7..39216e6a59ed 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c | |||
@@ -320,8 +320,8 @@ static void ipgre_err(struct sk_buff *skb, u32 info) | |||
320 | struct iphdr *iph = (struct iphdr*)skb->data; | 320 | struct iphdr *iph = (struct iphdr*)skb->data; |
321 | __be16 *p = (__be16*)(skb->data+(iph->ihl<<2)); | 321 | __be16 *p = (__be16*)(skb->data+(iph->ihl<<2)); |
322 | int grehlen = (iph->ihl<<2) + 4; | 322 | int grehlen = (iph->ihl<<2) + 4; |
323 | int type = skb->h.icmph->type; | 323 | const int type = icmp_hdr(skb)->type; |
324 | int code = skb->h.icmph->code; | 324 | const int code = icmp_hdr(skb)->code; |
325 | struct ip_tunnel *t; | 325 | struct ip_tunnel *t; |
326 | __be16 flags; | 326 | __be16 flags; |
327 | 327 | ||
@@ -388,8 +388,8 @@ out: | |||
388 | struct iphdr *iph = (struct iphdr*)dp; | 388 | struct iphdr *iph = (struct iphdr*)dp; |
389 | struct iphdr *eiph; | 389 | struct iphdr *eiph; |
390 | __be16 *p = (__be16*)(dp+(iph->ihl<<2)); | 390 | __be16 *p = (__be16*)(dp+(iph->ihl<<2)); |
391 | int type = skb->h.icmph->type; | 391 | const int type = icmp_hdr(skb)->type; |
392 | int code = skb->h.icmph->code; | 392 | const int code = icmp_hdr(skb)->code; |
393 | int rel_type = 0; | 393 | int rel_type = 0; |
394 | int rel_code = 0; | 394 | int rel_code = 0; |
395 | __be32 rel_info = 0; | 395 | __be32 rel_info = 0; |
@@ -422,7 +422,7 @@ out: | |||
422 | default: | 422 | default: |
423 | return; | 423 | return; |
424 | case ICMP_PARAMETERPROB: | 424 | case ICMP_PARAMETERPROB: |
425 | n = ntohl(skb->h.icmph->un.gateway) >> 24; | 425 | n = ntohl(icmp_hdr(skb)->un.gateway) >> 24; |
426 | if (n < (iph->ihl<<2)) | 426 | if (n < (iph->ihl<<2)) |
427 | return; | 427 | return; |
428 | 428 | ||
@@ -442,7 +442,7 @@ out: | |||
442 | return; | 442 | return; |
443 | case ICMP_FRAG_NEEDED: | 443 | case ICMP_FRAG_NEEDED: |
444 | /* And it is the only really necessary thing :-) */ | 444 | /* And it is the only really necessary thing :-) */ |
445 | n = ntohs(skb->h.icmph->un.frag.mtu); | 445 | n = ntohs(icmp_hdr(skb)->un.frag.mtu); |
446 | if (n < grehlen+68) | 446 | if (n < grehlen+68) |
447 | return; | 447 | return; |
448 | n -= grehlen; | 448 | n -= grehlen; |