[SK_BUFF]: Introduce skb_set_mac_header()
For the cases where we want to set skb->mac.raw to an offset from skb->data. Simple cases first, the memmove ones and specially pktgen will be left for later. 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
f64955eb11
commit
48d49d0ccd
@@ -458,7 +458,7 @@ static void br2684_push(struct atm_vcc *atmvcc, struct sk_buff *skb)
|
||||
/* FIXME: tcpdump shows that pointer to mac header is 2 bytes earlier,
|
||||
than should be. What else should I set? */
|
||||
skb_pull(skb, plen);
|
||||
skb->mac.raw = skb->data - ETH_HLEN;
|
||||
skb_set_mac_header(skb, -ETH_HLEN);
|
||||
skb->pkt_type = PACKET_HOST;
|
||||
#ifdef CONFIG_BR2684_FAST_TRANS
|
||||
skb->protocol = ((u16 *) skb->data)[-1];
|
||||
|
Reference in New Issue
Block a user