mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-30 10:49:28 +00:00
[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:
parent
bbe735e424
commit
d56f90a7c9
59 changed files with 258 additions and 185 deletions
|
@ -92,8 +92,8 @@ static int esp6_output(struct xfrm_state *x, struct sk_buff *skb)
|
|||
top_iph = (struct ipv6hdr *)__skb_push(skb, hdr_len);
|
||||
esph = (struct ipv6_esp_hdr *)skb->h.raw;
|
||||
top_iph->payload_len = htons(skb->len + alen - sizeof(*top_iph));
|
||||
*(u8*)(trailer->tail - 1) = *skb->nh.raw;
|
||||
*skb->nh.raw = IPPROTO_ESP;
|
||||
*(u8 *)(trailer->tail - 1) = *skb_network_header(skb);
|
||||
*skb_network_header(skb) = IPPROTO_ESP;
|
||||
|
||||
esph->spi = x->id.spi;
|
||||
esph->seq_no = htonl(++x->replay.oseq);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue