aboutsummaryrefslogtreecommitdiffstats
path: root/net/packet
diff options
context:
space:
mode:
Diffstat (limited to 'net/packet')
-rw-r--r--net/packet/af_packet.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index 73cb2d3e27d2..1225e751b3f1 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -401,14 +401,14 @@ static int packet_sendmsg_spkt(struct kiocb *iocb, struct socket *sock,
401 * notable one here. This should really be fixed at the driver level. 401 * notable one here. This should really be fixed at the driver level.
402 */ 402 */
403 skb_reserve(skb, LL_RESERVED_SPACE(dev)); 403 skb_reserve(skb, LL_RESERVED_SPACE(dev));
404 skb->nh.raw = skb->data; 404 skb_reset_network_header(skb);
405 405
406 /* Try to align data part correctly */ 406 /* Try to align data part correctly */
407 if (dev->hard_header) { 407 if (dev->hard_header) {
408 skb->data -= dev->hard_header_len; 408 skb->data -= dev->hard_header_len;
409 skb->tail -= dev->hard_header_len; 409 skb->tail -= dev->hard_header_len;
410 if (len < dev->hard_header_len) 410 if (len < dev->hard_header_len)
411 skb->nh.raw = skb->data; 411 skb_reset_network_header(skb);
412 } 412 }
413 413
414 /* Returns -EFAULT on error */ 414 /* Returns -EFAULT on error */
@@ -768,7 +768,7 @@ static int packet_sendmsg(struct kiocb *iocb, struct socket *sock,
768 goto out_unlock; 768 goto out_unlock;
769 769
770 skb_reserve(skb, LL_RESERVED_SPACE(dev)); 770 skb_reserve(skb, LL_RESERVED_SPACE(dev));
771 skb->nh.raw = skb->data; 771 skb_reset_network_header(skb);
772 772
773 if (dev->hard_header) { 773 if (dev->hard_header) {
774 int res; 774 int res;