diff options
Diffstat (limited to 'net/packet')
-rw-r--r-- | net/packet/af_packet.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index c5244b309640..c9ee343c2a6c 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c | |||
@@ -519,10 +519,8 @@ static int packet_rcv(struct sk_buff *skb, struct net_device *dev, struct packet | |||
519 | sll->sll_ifindex = orig_dev->ifindex; | 519 | sll->sll_ifindex = orig_dev->ifindex; |
520 | else | 520 | else |
521 | sll->sll_ifindex = dev->ifindex; | 521 | sll->sll_ifindex = dev->ifindex; |
522 | sll->sll_halen = 0; | ||
523 | 522 | ||
524 | if (dev->hard_header_parse) | 523 | sll->sll_halen = dev_parse_header(skb, sll->sll_addr); |
525 | sll->sll_halen = dev->hard_header_parse(skb, sll->sll_addr); | ||
526 | 524 | ||
527 | PACKET_SKB_CB(skb)->origlen = skb->len; | 525 | PACKET_SKB_CB(skb)->origlen = skb->len; |
528 | 526 | ||
@@ -658,9 +656,7 @@ static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, struct packe | |||
658 | h->tp_usec = tv.tv_usec; | 656 | h->tp_usec = tv.tv_usec; |
659 | 657 | ||
660 | sll = (struct sockaddr_ll*)((u8*)h + TPACKET_ALIGN(sizeof(*h))); | 658 | sll = (struct sockaddr_ll*)((u8*)h + TPACKET_ALIGN(sizeof(*h))); |
661 | sll->sll_halen = 0; | 659 | sll->sll_halen = dev_parse_header(skb, sll->sll_addr); |
662 | if (dev->hard_header_parse) | ||
663 | sll->sll_halen = dev->hard_header_parse(skb, sll->sll_addr); | ||
664 | sll->sll_family = AF_PACKET; | 660 | sll->sll_family = AF_PACKET; |
665 | sll->sll_hatype = dev->type; | 661 | sll->sll_hatype = dev->type; |
666 | sll->sll_protocol = skb->protocol; | 662 | sll->sll_protocol = skb->protocol; |