summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2009-01-16 13:22:26 +0100
committerJens Axboe <jens.axboe@oracle.com>2009-01-16 13:22:26 +0100
commit3f8fc5ad7d36fa171559e7b94b0fd211ba2a4561 (patch)
tree8f5197750ec57146f0eec8ea5afcc6ddd4278d48
parent414c2a3e741bb7dd7147ce6843f529c7773cea38 (diff)
downloadfio-3f8fc5ad7d36fa171559e7b94b0fd211ba2a4561.tar.gz
fio-3f8fc5ad7d36fa171559e7b94b0fd211ba2a4561.tar.bz2
net engine: accept both upper and lowercase tcp/udp.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
-rw-r--r--engines/net.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/net.c b/engines/net.c
index 2a9caaa2..8dbc2a85 100644
--- a/engines/net.c
+++ b/engines/net.c
@@ -452,9 +452,11 @@ static int fio_netio_init(struct thread_data *td)
goto bad_host;
if (modep) {
- if (!strncmp("tcp", modep, strlen(modep)))
+ if (!strncmp("tcp", modep, strlen(modep)) ||
+ !strncmp("TCP", modep, strlen(modep)))
nd->net_protocol = IPPROTO_TCP;
- else if (!strncmp("udp", modep, strlen(modep)))
+ else if (!strncmp("udp", modep, strlen(modep)) ||
+ !strncmp("UDP", modep, strlen(modep)))
nd->net_protocol = IPPROTO_UDP;
else
goto bad_host;