aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ip_gre.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-03-13 13:43:18 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:25:23 -0400
commit88c7664f13bd1a36acb8566b93892a4c58759ac6 (patch)
tree18ead610bf54ef87f3832c61d64a4bad30d4f78e /net/ipv4/ip_gre.c
parent4bedb45203eab92a87b4c863fe2d0cded633427f (diff)
[SK_BUFF]: Introduce icmp_hdr(), remove skb->h.icmph
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_gre.c')
-rw-r--r--net/ipv4/ip_gre.c12
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;