Line 0
Link Here
|
|
|
1 |
--- src/fping.c.orig 2020-08-05 11:10:13 UTC |
2 |
+++ src/fping.c |
3 |
@@ -1060,11 +1060,11 @@ int main(int argc, char** argv) |
4 |
exit(num_noaddress ? 2 : 1); |
5 |
} |
6 |
|
7 |
- if (socket4 >= 0) { |
8 |
+ if (src_addr_set && socket4 >= 0) { |
9 |
socket_set_src_addr_ipv4(socket4, &src_addr, (socktype4 == SOCK_DGRAM) ? &ident4 : NULL); |
10 |
} |
11 |
#ifdef IPV6 |
12 |
- if (socket6 >= 0) { |
13 |
+ if (src_addr6_set && socket6 >= 0) { |
14 |
socket_set_src_addr_ipv6(socket6, &src_addr6, (socktype6 == SOCK_DGRAM) ? &ident6 : NULL); |
15 |
} |
16 |
#endif |