projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
41fa20e
)
net: fix segfault with receiver, tcp, and no hostname set
author
Jens Axboe
<axboe@kernel.dk>
Thu, 29 Nov 2012 13:35:33 +0000
(14:35 +0100)
committer
Jens Axboe
<axboe@kernel.dk>
Thu, 29 Nov 2012 13:35:33 +0000
(14:35 +0100)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
engines/net.c
patch
|
blob
|
blame
|
history
diff --git
a/engines/net.c
b/engines/net.c
index c5337994fa41509acad7a4cf91003b0ac1422503..101f7540789b9994a084777e02529e4be102429b 100644
(file)
--- a/
engines/net.c
+++ b/
engines/net.c
@@
-543,6
+543,15
@@
static int fio_netio_setup_connect_inet(struct thread_data *td,
{
struct netio_data *nd = td->io_ops->data;
+ if (!host) {
+ log_err("fio: connect with no host to connect to.\n");
+ if (td_read(td))
+ log_err("fio: did you forget to set 'listen'?\n");
+
+ td_verror(td, EINVAL, "no hostname= set");
+ return 1;
+ }
+
nd->addr.sin_family = AF_INET;
nd->addr.sin_port = htons(port);