[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>
This commit is contained in:
committed by
David S. Miller
parent
d0a92be05e
commit
0660e03f6b
@@ -393,10 +393,10 @@ static void sctp_v6_from_skb(union sctp_addr *addr,struct sk_buff *skb,
|
||||
sh = (struct sctphdr *) skb->h.raw;
|
||||
if (is_saddr) {
|
||||
*port = sh->source;
|
||||
from = &skb->nh.ipv6h->saddr;
|
||||
from = &ipv6_hdr(skb)->saddr;
|
||||
} else {
|
||||
*port = sh->dest;
|
||||
from = &skb->nh.ipv6h->daddr;
|
||||
from = &ipv6_hdr(skb)->daddr;
|
||||
}
|
||||
ipv6_addr_copy(&addr->v6.sin6_addr, from);
|
||||
}
|
||||
@@ -698,7 +698,7 @@ static int sctp_v6_skb_iif(const struct sk_buff *skb)
|
||||
/* Was this packet marked by Explicit Congestion Notification? */
|
||||
static int sctp_v6_is_ce(const struct sk_buff *skb)
|
||||
{
|
||||
return *((__u32 *)(skb->nh.ipv6h)) & htonl(1<<20);
|
||||
return *((__u32 *)(ipv6_hdr(skb))) & htonl(1 << 20);
|
||||
}
|
||||
|
||||
/* Dump the v6 addr to the seq file. */
|
||||
@@ -777,7 +777,7 @@ static void sctp_inet6_skb_msgname(struct sk_buff *skb, char *msgname,
|
||||
}
|
||||
|
||||
/* Otherwise, just copy the v6 address. */
|
||||
ipv6_addr_copy(&sin6->sin6_addr, &skb->nh.ipv6h->saddr);
|
||||
ipv6_addr_copy(&sin6->sin6_addr, &ipv6_hdr(skb)->saddr);
|
||||
if (ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_LINKLOCAL) {
|
||||
struct sctp_ulpevent *ev = sctp_skb2event(skb);
|
||||
sin6->sin6_scope_id = ev->iif;
|
||||
|
Reference in New Issue
Block a user