summaryrefslogtreecommitdiffstats
path: root/src/bench
diff options
context:
space:
mode:
authorSimon Rettberg2019-08-23 12:31:21 +0200
committerSimon Rettberg2019-08-23 12:31:37 +0200
commit64348f92494484c69e182f41d3d13e419632e30e (patch)
tree9134e661c6f84702dbda42aa96859e35106c39bb /src/bench
parent[SERVER] Get rid of alt-servers thread, per-uplink rtt history (diff)
downloaddnbd3-64348f92494484c69e182f41d3d13e419632e30e.tar.gz
dnbd3-64348f92494484c69e182f41d3d13e419632e30e.tar.xz
dnbd3-64348f92494484c69e182f41d3d13e419632e30e.zip
[BENCH] Check CMD_GET_BLOCK reply cmd type
Diffstat (limited to 'src/bench')
-rw-r--r--src/bench/connection.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bench/connection.c b/src/bench/connection.c
index ce9438a..498bc62 100644
--- a/src/bench/connection.c
+++ b/src/bench/connection.c
@@ -102,6 +102,9 @@ bool connection_init_n_times(
} else if ( !dnbd3_get_reply( sock, &reply ) ) {
counters->fails++;
logadd( LOG_ERROR, "recv: get block header failed" );
+ } else if ( reply.cmd != CMD_GET_BLOCK ) {
+ counters->fails++;
+ logadd( LOG_ERROR, "recv: get block reply is not CMD_GET_BLOCK" );
} else {
int rv, togo = blockSize;
do {