Commit d2887e3c authored by Alexey Kuznetsov's avatar Alexey Kuznetsov Committed by David S. Miller

Port of 2.2.x AF_PACKET bug fix.

parent 00d67c5a
...@@ -358,6 +358,8 @@ static int packet_sendmsg_spkt(struct socket *sock, struct msghdr *msg, int len, ...@@ -358,6 +358,8 @@ static int packet_sendmsg_spkt(struct socket *sock, struct msghdr *msg, int len,
if (dev->hard_header) { if (dev->hard_header) {
skb->data -= dev->hard_header_len; skb->data -= dev->hard_header_len;
skb->tail -= dev->hard_header_len; skb->tail -= dev->hard_header_len;
if (len < dev->hard_header_len)
skb->nh.raw = skb->data;
} }
/* Returns -EFAULT on error */ /* Returns -EFAULT on error */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment