blob: 6f0c8ac0e2794bea429e3348425dc9f1136c3ced (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
diff --git a/libmachdev/net.c b/libmachdev/net.c
index 07bb74a..e04b558 100644
--- a/libmachdev/net.c
+++ b/libmachdev/net.c
@@ -243,8 +243,10 @@ netif_rx_handle (char *data, int len, struct net_device *dev)
pack_size = len - sizeof (struct ethhdr);
/* remember message sizes must be rounded up */
- net_msg->msg_hdr.msgh_size = (((mach_msg_size_t) (sizeof(struct net_rcv_msg)
- - NET_RCV_MAX + pack_size)) + 3) & ~3;
+ net_msg->msg_hdr.msgh_size =
+ (((mach_msg_size_t) (sizeof (struct net_rcv_msg)
+ - sizeof net_msg->sent
+ - NET_RCV_MAX + pack_size)) + 3) & ~3;
/* Copy packet into message buffer. */
eh = (struct ether_header *) (net_msg->header);
|