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

[Nbd] found bug in nbd-server.c, handle_info()



Hi all- new nbd user, thanks for all your work.

On the gitlab trunk, I discovered nbd_server.c, handle_info() function does not perform "return true" as its last line, so no defined return value back into negotiate(). If the return value register is 0, the server stays in the protocol negotiation phase after the client says NBT_OPT_GO, which leads to a "Negotiation failed/5a: magic mismatch" error on the 1st transaction.

Because of the undefined return value this error may appear or not depending on random circumstances, gcc rev, cpu architecture, etc.. I discovered it on Linux 3.11.10-100.fc18.x86_64

Thanks!

Greg




Reply to: