[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH hurd-dde 6/7] libmachdev: fix size of `net_rcv_msg' message
From: |
Justus Winter |
Subject: |
[PATCH hurd-dde 6/7] libmachdev: fix size of `net_rcv_msg' message |
Date: |
Wed, 26 Nov 2014 15:22:35 +0100 |
Account for the `struct packet_header' that is prepended to the
network packet in the calculation of the `net_rcv_msg' message. This
complements e363aa56.
* libmachdev/net.c (netif_rx_handle): Fix size of message.
---
libmachdev/net.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libmachdev/net.c b/libmachdev/net.c
index 7ddf95d..47e85aa 100644
--- a/libmachdev/net.c
+++ b/libmachdev/net.c
@@ -239,6 +239,7 @@ netif_rx_handle (char *data, int len, struct net_device
*dev)
net_msg->msg_hdr.msgh_size =
(((mach_msg_size_t) (sizeof (struct net_rcv_msg)
- sizeof net_msg->sent
+ + sizeof (struct packet_header)
- NET_RCV_MAX + pack_size)) + 3) & ~3;
/* Copy packet into message buffer. */
--
2.1.3
- [PATCH hurd-dde 1/7] Drop superfluous files, Justus Winter, 2014/11/26
- [PATCH hurd-dde 6/7] libmachdev: fix size of `net_rcv_msg' message,
Justus Winter <=
- [PATCH hurd-dde 7/7] libmachdev: drop static libmachdev.so hack, Justus Winter, 2014/11/26
- [PATCH hurd-dde 3/7] libmachdev: drop unused function, Justus Winter, 2014/11/26
- [PATCH hurd-dde 4/7] libmachdev: drop debugging printf, Justus Winter, 2014/11/26
- Re: [PATCH hurd-dde 1/7] Drop superfluous files, Samuel Thibault, 2014/11/26