[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
@@ -166,10 +166,10 @@ static int ipcomp6_output(struct xfrm_state *x, struct sk_buff *skb)
|
||||
top_iph->payload_len = htons(skb->len - sizeof(struct ipv6hdr));
|
||||
|
||||
ipch = (struct ipv6_comp_hdr *)start;
|
||||
ipch->nexthdr = *skb->nh.raw;
|
||||
ipch->nexthdr = *skb_network_header(skb);
|
||||
ipch->flags = 0;
|
||||
ipch->cpi = htons((u16 )ntohl(x->id.spi));
|
||||
*skb->nh.raw = IPPROTO_COMP;
|
||||
*skb_network_header(skb) = IPPROTO_COMP;
|
||||
|
||||
out_ok:
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user