Re: [Nbd] Possible endian error in nbd-server.c: send_reply()
- To: nbd-general@lists.sourceforge.net
- Subject: Re: [Nbd] Possible endian error in nbd-server.c: send_reply()
- From: Wouter Verhelst <w@...112...>
- Date: Tue, 07 May 2013 08:12:17 +0200
- Message-id: <51889B41.2010608@...112...>
- In-reply-to: <20130505152151.GA15801@...1266...>
- References: <20130505152151.GA15801@...1266...>
On 05-05-13 17:21, Goswin von Brederlow wrote:
> Hi,
>
> I'm trying to get a list of export names from the server so I'm
> sending NBD_OPT_LIST (3) and the server replies with an option type of
> 0x3000000 instead of 3.
>
> I think the problem lies in nbd-server.c:send_reply(). The opt value
> given is in host byte order but must be send in network byte order. So
> the code is missing a
>
> opt = htonl(opt);
>
> Right?
Yes. This had already been reported, actually, but I forgot about it a bit.
--
This end should point toward the ground if you want to go to space.
If it starts pointing toward space you are having a bad problem and you
will not go to space today.
-- http://xkcd.com/1133/
Reply to: