diff options
Diffstat (limited to 'net/packet')
-rw-r--r-- | net/packet/af_packet.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index 6f8c72d2413b..73cb2d3e27d2 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c | |||
@@ -284,7 +284,7 @@ static int packet_rcv_spkt(struct sk_buff *skb, struct net_device *dev, struct | |||
284 | * Incoming packets have ll header pulled, | 284 | * Incoming packets have ll header pulled, |
285 | * push it back. | 285 | * push it back. |
286 | * | 286 | * |
287 | * For outgoing ones skb->data == skb->mac.raw | 287 | * For outgoing ones skb->data == skb_mac_header(skb) |
288 | * so that this procedure is noop. | 288 | * so that this procedure is noop. |
289 | */ | 289 | */ |
290 | 290 | ||
@@ -303,7 +303,7 @@ static int packet_rcv_spkt(struct sk_buff *skb, struct net_device *dev, struct | |||
303 | 303 | ||
304 | spkt = &PACKET_SKB_CB(skb)->sa.pkt; | 304 | spkt = &PACKET_SKB_CB(skb)->sa.pkt; |
305 | 305 | ||
306 | skb_push(skb, skb->data-skb->mac.raw); | 306 | skb_push(skb, skb->data - skb_mac_header(skb)); |
307 | 307 | ||
308 | /* | 308 | /* |
309 | * The SOCK_PACKET socket receives _all_ frames. | 309 | * The SOCK_PACKET socket receives _all_ frames. |
@@ -488,7 +488,7 @@ static int packet_rcv(struct sk_buff *skb, struct net_device *dev, struct packet | |||
488 | never delivered to user. | 488 | never delivered to user. |
489 | */ | 489 | */ |
490 | if (sk->sk_type != SOCK_DGRAM) | 490 | if (sk->sk_type != SOCK_DGRAM) |
491 | skb_push(skb, skb->data - skb->mac.raw); | 491 | skb_push(skb, skb->data - skb_mac_header(skb)); |
492 | else if (skb->pkt_type == PACKET_OUTGOING) { | 492 | else if (skb->pkt_type == PACKET_OUTGOING) { |
493 | /* Special case: outgoing packets have ll header at head */ | 493 | /* Special case: outgoing packets have ll header at head */ |
494 | skb_pull(skb, skb->nh.raw - skb->data); | 494 | skb_pull(skb, skb->nh.raw - skb->data); |
@@ -592,7 +592,7 @@ static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, struct packe | |||
592 | 592 | ||
593 | if (dev->hard_header) { | 593 | if (dev->hard_header) { |
594 | if (sk->sk_type != SOCK_DGRAM) | 594 | if (sk->sk_type != SOCK_DGRAM) |
595 | skb_push(skb, skb->data - skb->mac.raw); | 595 | skb_push(skb, skb->data - skb_mac_header(skb)); |
596 | else if (skb->pkt_type == PACKET_OUTGOING) { | 596 | else if (skb->pkt_type == PACKET_OUTGOING) { |
597 | /* Special case: outgoing packets have ll header at head */ | 597 | /* Special case: outgoing packets have ll header at head */ |
598 | skb_pull(skb, skb->nh.raw - skb->data); | 598 | skb_pull(skb, skb->nh.raw - skb->data); |