aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/mcast.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/mcast.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/mcast.c')
-rw-r--r--net/ipv6/mcast.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index 924e24907c3e..b2b37ba48b9c 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -1167,11 +1167,11 @@ int igmp6_event_query(struct sk_buff *skb)
1167 return -EINVAL; 1167 return -EINVAL;
1168 1168
1169 /* compute payload length excluding extension headers */ 1169 /* compute payload length excluding extension headers */
1170 len = ntohs(skb->nh.ipv6h->payload_len) + sizeof(struct ipv6hdr); 1170 len = ntohs(ipv6_hdr(skb)->payload_len) + sizeof(struct ipv6hdr);
1171 len -= (char *)skb->h.raw - (char *)skb->nh.ipv6h; 1171 len -= skb->h.raw - skb->nh.raw;
1172 1172
1173 /* Drop queries with not link local source */ 1173 /* Drop queries with not link local source */
1174 if (!(ipv6_addr_type(&skb->nh.ipv6h->saddr)&IPV6_ADDR_LINKLOCAL)) 1174 if (!(ipv6_addr_type(&ipv6_hdr(skb)->saddr) & IPV6_ADDR_LINKLOCAL))
1175 return -EINVAL; 1175 return -EINVAL;
1176 1176
1177 idev = in6_dev_get(skb->dev); 1177 idev = in6_dev_get(skb->dev);
@@ -1303,7 +1303,7 @@ int igmp6_event_report(struct sk_buff *skb)
1303 hdr = (struct icmp6hdr*) skb->h.raw; 1303 hdr = (struct icmp6hdr*) skb->h.raw;
1304 1304
1305 /* Drop reports with not link local source */ 1305 /* Drop reports with not link local source */
1306 addr_type = ipv6_addr_type(&skb->nh.ipv6h->saddr); 1306 addr_type = ipv6_addr_type(&ipv6_hdr(skb)->saddr);
1307 if (addr_type != IPV6_ADDR_ANY && 1307 if (addr_type != IPV6_ADDR_ANY &&
1308 !(addr_type&IPV6_ADDR_LINKLOCAL)) 1308 !(addr_type&IPV6_ADDR_LINKLOCAL))
1309 return -EINVAL; 1309 return -EINVAL;
@@ -1441,7 +1441,7 @@ static inline int mld_dev_queue_xmit2(struct sk_buff *skb)
1441 unsigned char ha[MAX_ADDR_LEN]; 1441 unsigned char ha[MAX_ADDR_LEN];
1442 int err; 1442 int err;
1443 1443
1444 ndisc_mc_map(&skb->nh.ipv6h->daddr, ha, dev, 1); 1444 ndisc_mc_map(&ipv6_hdr(skb)->daddr, ha, dev, 1);
1445 err = dev->hard_header(skb, dev, ETH_P_IPV6, ha, NULL, skb->len); 1445 err = dev->hard_header(skb, dev, ETH_P_IPV6, ha, NULL, skb->len);
1446 if (err < 0) { 1446 if (err < 0) {
1447 kfree_skb(skb); 1447 kfree_skb(skb);
@@ -1459,15 +1459,14 @@ static inline int mld_dev_queue_xmit(struct sk_buff *skb)
1459 1459
1460static void mld_sendpack(struct sk_buff *skb) 1460static void mld_sendpack(struct sk_buff *skb)
1461{ 1461{
1462 struct ipv6hdr *pip6 = skb->nh.ipv6h; 1462 struct ipv6hdr *pip6 = ipv6_hdr(skb);
1463 struct mld2_report *pmr = (struct mld2_report *)skb->h.raw; 1463 struct mld2_report *pmr = (struct mld2_report *)skb->h.raw;
1464 int payload_len, mldlen; 1464 int payload_len, mldlen;
1465 struct inet6_dev *idev = in6_dev_get(skb->dev); 1465 struct inet6_dev *idev = in6_dev_get(skb->dev);
1466 int err; 1466 int err;
1467 1467
1468 IP6_INC_STATS(idev, IPSTATS_MIB_OUTREQUESTS); 1468 IP6_INC_STATS(idev, IPSTATS_MIB_OUTREQUESTS);
1469 payload_len = skb->tail - (unsigned char *)skb->nh.ipv6h - 1469 payload_len = skb->tail - skb_network_header(skb) - sizeof(*pip6);
1470 sizeof(struct ipv6hdr);
1471 mldlen = skb->tail - skb->h.raw; 1470 mldlen = skb->tail - skb->h.raw;
1472 pip6->payload_len = htons(payload_len); 1471 pip6->payload_len = htons(payload_len);
1473 1472