]> git.gsnw.org Git - fping.git/commitdiff
fix setting of IPv4 source address
authorDavid Schweikert <david@schweikert.ch>
Fri, 10 Feb 2017 08:43:21 +0000 (09:43 +0100)
committerDavid Schweikert <david@schweikert.ch>
Fri, 10 Feb 2017 08:43:21 +0000 (09:43 +0100)
src/fping.c

index 6e5da7d208a3bca3d95612157fe6aa852a6cd547..82a588039803075f40234e59105da61d938dc081 100644 (file)
@@ -858,11 +858,10 @@ int main(int argc, char** argv)
         exit(num_noaddress ? 2 : 1);
     }
 
-#ifndef IPV6
     if (src_addr_set) {
         socket_set_src_addr_ipv4(socket4, &src_addr);
     }
-#else
+#ifdef IPV6
     if (src_addr6_set) {
         socket_set_src_addr_ipv6(socket6, &src_addr6);
     }