bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] libmachdev: fix net_rcv_msg-messages


From: Ivan Shmakov
Subject: Re: [PATCH] libmachdev: fix net_rcv_msg-messages
Date: Wed, 11 Jun 2014 16:23:02 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

>>>>> Justus Winter <4winter@informatik.uni-hamburg.de> writes:

[…]

 > @@ -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)

        While at it, couldn’t the above have been changed to
        sizeof (*net_msg), BTW?

 > +                     - sizeof net_msg->sent
 > +                     - NET_RCV_MAX + pack_size)) + 3) & ~3;

 >    /* Copy packet into message buffer.  */
 >    eh = (struct ether_header *) (net_msg->header);

-- 
FSF associate member #7257      http://boycottsystemd.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]