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

Re: [Nbd] Possible endian error in nbd-server.c: send_reply()



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: