[SK_BUFF]: Introduce skb_mac_header()
For the places where we need a pointer to the mac header, it is still legal to touch skb->mac.raw directly if just adding to, subtracting from or setting it to another layer header. This one also converts some more cases to skb_reset_mac_header() that my regex missed as it had no spaces before nor after '=', ugh. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Этот коммит содержится в:

коммит произвёл
David S. Miller

родитель
31713c333d
Коммит
98e399f82a
@@ -108,9 +108,9 @@ static int xfrm6_tunnel_input(struct xfrm_state *x, struct sk_buff *skb)
|
||||
ip6ip_ecn_decapsulate(skb);
|
||||
skb->protocol = htons(ETH_P_IP);
|
||||
}
|
||||
old_mac = skb->mac.raw;
|
||||
old_mac = skb_mac_header(skb);
|
||||
skb_set_mac_header(skb, -skb->mac_len);
|
||||
memmove(skb->mac.raw, old_mac, skb->mac_len);
|
||||
memmove(skb_mac_header(skb), old_mac, skb->mac_len);
|
||||
skb->nh.raw = skb->data;
|
||||
err = 0;
|
||||
|
||||
|
Ссылка в новой задаче
Block a user