aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/icmp.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-04-25 20:54:47 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:25:14 -0400
commit0660e03f6b18f19b6bbafe7583265a51b90daf36 (patch)
tree82cc819ead5ab7858ba211ee8719a3e6d2bb984f /net/ipv6/icmp.c
parentd0a92be05ed4aea7d35c2b257e3f9173565fe4eb (diff)
[SK_BUFF]: Introduce ipv6_hdr(), remove skb->nh.ipv6h
Now the skb->nh union has just one member, .raw, i.e. it is just like the skb->mac union, strange, no? I'm just leaving it like that till the transport layer is done with, when we'll rename skb->mac.raw to skb->mac_header (or ->mac_header_offset?), ditto for ->{h,nh}. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/icmp.c')
-rw-r--r--net/ipv6/icmp.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index e5293b34229f..3a01effda695 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -129,9 +129,9 @@ void icmpv6_param_prob(struct sk_buff *skb, int code, int pos)
129 129
130static int is_ineligible(struct sk_buff *skb) 130static int is_ineligible(struct sk_buff *skb)
131{ 131{
132 int ptr = (u8*)(skb->nh.ipv6h+1) - skb->data; 132 int ptr = (u8 *)(ipv6_hdr(skb) + 1) - skb->data;
133 int len = skb->len - ptr; 133 int len = skb->len - ptr;
134 __u8 nexthdr = skb->nh.ipv6h->nexthdr; 134 __u8 nexthdr = ipv6_hdr(skb)->nexthdr;
135 135
136 if (len < 0) 136 if (len < 0)
137 return 1; 137 return 1;
@@ -275,7 +275,7 @@ static int icmpv6_getfrag(void *from, char *to, int offset, int len, int odd, st
275#ifdef CONFIG_IPV6_MIP6 275#ifdef CONFIG_IPV6_MIP6
276static void mip6_addr_swap(struct sk_buff *skb) 276static void mip6_addr_swap(struct sk_buff *skb)
277{ 277{
278 struct ipv6hdr *iph = skb->nh.ipv6h; 278 struct ipv6hdr *iph = ipv6_hdr(skb);
279 struct inet6_skb_parm *opt = IP6CB(skb); 279 struct inet6_skb_parm *opt = IP6CB(skb);
280 struct ipv6_destopt_hao *hao; 280 struct ipv6_destopt_hao *hao;
281 struct in6_addr tmp; 281 struct in6_addr tmp;
@@ -303,7 +303,7 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info,
303 struct net_device *dev) 303 struct net_device *dev)
304{ 304{
305 struct inet6_dev *idev = NULL; 305 struct inet6_dev *idev = NULL;
306 struct ipv6hdr *hdr = skb->nh.ipv6h; 306 struct ipv6hdr *hdr = ipv6_hdr(skb);
307 struct sock *sk; 307 struct sock *sk;
308 struct ipv6_pinfo *np; 308 struct ipv6_pinfo *np;
309 struct in6_addr *saddr = NULL; 309 struct in6_addr *saddr = NULL;
@@ -485,7 +485,7 @@ static void icmpv6_echo_reply(struct sk_buff *skb)
485 int hlimit; 485 int hlimit;
486 int tclass; 486 int tclass;
487 487
488 saddr = &skb->nh.ipv6h->daddr; 488 saddr = &ipv6_hdr(skb)->daddr;
489 489
490 if (!ipv6_unicast_destination(skb)) 490 if (!ipv6_unicast_destination(skb))
491 saddr = NULL; 491 saddr = NULL;
@@ -495,7 +495,7 @@ static void icmpv6_echo_reply(struct sk_buff *skb)
495 495
496 memset(&fl, 0, sizeof(fl)); 496 memset(&fl, 0, sizeof(fl));
497 fl.proto = IPPROTO_ICMPV6; 497 fl.proto = IPPROTO_ICMPV6;
498 ipv6_addr_copy(&fl.fl6_dst, &skb->nh.ipv6h->saddr); 498 ipv6_addr_copy(&fl.fl6_dst, &ipv6_hdr(skb)->saddr);
499 if (saddr) 499 if (saddr)
500 ipv6_addr_copy(&fl.fl6_src, saddr); 500 ipv6_addr_copy(&fl.fl6_src, saddr);
501 fl.oif = skb->dev->ifindex; 501 fl.oif = skb->dev->ifindex;
@@ -583,8 +583,8 @@ static void icmpv6_notify(struct sk_buff *skb, int type, int code, __be32 info)
583 if (!pskb_may_pull(skb, inner_offset+8)) 583 if (!pskb_may_pull(skb, inner_offset+8))
584 return; 584 return;
585 585
586 saddr = &skb->nh.ipv6h->saddr; 586 saddr = &ipv6_hdr(skb)->saddr;
587 daddr = &skb->nh.ipv6h->daddr; 587 daddr = &ipv6_hdr(skb)->daddr;
588 588
589 /* BUGGG_FUTURE: we should try to parse exthdrs in this packet. 589 /* BUGGG_FUTURE: we should try to parse exthdrs in this packet.
590 Without this we will not able f.e. to make source routed 590 Without this we will not able f.e. to make source routed
@@ -628,8 +628,8 @@ static int icmpv6_rcv(struct sk_buff **pskb)
628 628
629 ICMP6_INC_STATS_BH(idev, ICMP6_MIB_INMSGS); 629 ICMP6_INC_STATS_BH(idev, ICMP6_MIB_INMSGS);
630 630
631 saddr = &skb->nh.ipv6h->saddr; 631 saddr = &ipv6_hdr(skb)->saddr;
632 daddr = &skb->nh.ipv6h->daddr; 632 daddr = &ipv6_hdr(skb)->daddr;
633 633
634 /* Perform checksum. */ 634 /* Perform checksum. */
635 switch (skb->ip_summed) { 635 switch (skb->ip_summed) {