net: fix accidental overwrite of more than just the address
authorJens Axboe <axboe@fb.com>
Tue, 25 Feb 2014 21:43:38 +0000 (13:43 -0800)
committerJens Axboe <axboe@fb.com>
Tue, 25 Feb 2014 21:43:38 +0000 (13:43 -0800)
Commit 0b783341 accidentally overwrote more than just the
address, causing garbage in the connection part.

Signed-off-by: Jens Axboe <axboe@fb.com>
engines/net.c

index 8b85a88604bde109f86f4cf5864ab045560f3be1..dd06861cf4b841852255ad84ac29c76ad25c568a 100644 (file)
@@ -913,10 +913,10 @@ static int fio_netio_setup_connect_inet(struct thread_data *td,
 
        if (is_ipv6(o)) {
                af = AF_INET6;
-               dst = &nd->addr6;
+               dst = &nd->addr6.sin6_addr;
        } else {
                af = AF_INET;
-               dst = &nd->addr;
+               dst = &nd->addr.sin_addr;
        }
 
        if (fio_fill_addr(td, host, af, dst, &res))