NBD write: invalid request type used (htonl() was missing)

This commit is contained in:
folkert van heusden 2024-05-05 01:31:42 +02:00
parent 9bf3c4cd90
commit d44667771e
Signed by untrusted user who does not match committer: folkert
GPG key ID: 6B6455EDFEED3BD1

View file

@ -282,7 +282,7 @@ bool disk_backend_nbd::write(const off_t offset, const size_t n, const uint8_t *
} nbd_request { };
nbd_request.magic = ntohl(0x25609513);
nbd_request.type = 1; // WRITE
nbd_request.type = htonl(1); // WRITE
nbd_request.offset = HTONLL(uint64_t(offset));
nbd_request.length = htonl(n);