aboutsummaryrefslogtreecommitdiffstats
path: root/net/packet/af_packet.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/packet/af_packet.c')
-rw-r--r--net/packet/af_packet.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index ee865d88183b..499ae3df4a44 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -654,8 +654,8 @@ static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, struct packe
654 __net_timestamp(skb); 654 __net_timestamp(skb);
655 sock_enable_timestamp(sk); 655 sock_enable_timestamp(sk);
656 } 656 }
657 h->tp_sec = skb_tv_base.tv_sec + skb->tstamp.off_sec; 657 h->tp_sec = skb->tstamp.off_sec;
658 h->tp_usec = skb_tv_base.tv_usec + skb->tstamp.off_usec; 658 h->tp_usec = skb->tstamp.off_usec;
659 659
660 sll = (struct sockaddr_ll*)((u8*)h + TPACKET_ALIGN(sizeof(*h))); 660 sll = (struct sockaddr_ll*)((u8*)h + TPACKET_ALIGN(sizeof(*h)));
661 sll->sll_halen = 0; 661 sll->sll_halen = 0;
@@ -761,12 +761,6 @@ static int packet_sendmsg(struct kiocb *iocb, struct socket *sock,
761 if (dev->hard_header) { 761 if (dev->hard_header) {
762 int res; 762 int res;
763 err = -EINVAL; 763 err = -EINVAL;
764 if (saddr) {
765 if (saddr->sll_halen != dev->addr_len)
766 goto out_free;
767 if (saddr->sll_hatype != dev->type)
768 goto out_free;
769 }
770 res = dev->hard_header(skb, dev, ntohs(proto), addr, NULL, len); 764 res = dev->hard_header(skb, dev, ntohs(proto), addr, NULL, len);
771 if (sock->type != SOCK_DGRAM) { 765 if (sock->type != SOCK_DGRAM) {
772 skb->tail = skb->data; 766 skb->tail = skb->data;