[SK_BUFF]: Introduce skb_network_header()
For the places where we need a pointer to the network header, it is still legal to touch skb->nh.raw directly if just adding to, subtracting from or setting it to another layer header. 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
bbe735e424
commit
d56f90a7c9
@@ -284,7 +284,8 @@ static void mip6_addr_swap(struct sk_buff *skb)
|
||||
if (opt->dsthao) {
|
||||
off = ipv6_find_tlv(skb, opt->dsthao, IPV6_TLV_HAO);
|
||||
if (likely(off >= 0)) {
|
||||
hao = (struct ipv6_destopt_hao *)(skb->nh.raw + off);
|
||||
hao = (struct ipv6_destopt_hao *)
|
||||
(skb_network_header(skb) + off);
|
||||
ipv6_addr_copy(&tmp, &iph->saddr);
|
||||
ipv6_addr_copy(&iph->saddr, &hao->addr);
|
||||
ipv6_addr_copy(&hao->addr, &tmp);
|
||||
|
Reference in New Issue
Block a user