net engine: accept both upper and lowercase tcp/udp.
authorJens Axboe <jens.axboe@oracle.com>
Fri, 16 Jan 2009 12:22:26 +0000 (13:22 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Fri, 16 Jan 2009 12:22:26 +0000 (13:22 +0100)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
engines/net.c

index 2a9caaa24e8985172fd89764c190fba67c415674..8dbc2a8560bfbcfb4fb2735b08c86c025d0e5a14 100644 (file)
@@ -452,9 +452,11 @@ static int fio_netio_init(struct thread_data *td)
                goto bad_host;
 
        if (modep) {
                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;
                        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;
                        nd->net_protocol = IPPROTO_UDP;
                else
                        goto bad_host;