@@ -236,9 +236,10 @@ static int nbd_receive_options(NBDClient *client)
LOG("read failed");
goto fail;
}
- TRACE("Checking reserved");
- if (tmp != 0) {
- LOG("Bad reserved received");
+ TRACE("Checking client flags");
+ tmp = be32_to_cpu(tmp);
+ if (tmp != 0 && tmp != NBD_FLAG_C_FIXED_NEWSTYLE) {
+ LOG("Bad client flags received");
goto fail;
}
@@ -246,7 +247,7 @@ static int nbd_receive_options(NBDClient *client)
LOG("read failed");
goto fail;
}
- TRACE("Checking reserved");
+ TRACE("Checking opts magic");
if (magic != be64_to_cpu(NBD_OPTS_MAGIC)) {
LOG("Bad magic received");
goto fail;