bug-hurd
[Top][All Lists]
Advanced

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

Re: [PATCH hurd-dde 6/7] libmachdev: fix size of `net_rcv_msg' message


From: Samuel Thibault
Subject: Re: [PATCH hurd-dde 6/7] libmachdev: fix size of `net_rcv_msg' message
Date: Wed, 26 Nov 2014 18:52:27 +0100
User-agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30)

Justus Winter, le Wed 26 Nov 2014 15:22:35 +0100, a écrit :
> 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.

Ack.

> * 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
> 

-- 
Samuel
 Yep. Moi j'ai un clavier à une touche. 
 Par contre, ma souris a 102 boutons, c'est pas toujours pratique.
 -+- OG in: Guide du Cabaliste Usenet - Le mulot contre attaque -+-



reply via email to

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