use actual protocol family passed by user rather than hardcoded AF_INTE6 to cerate sockets. current code is not working for IPv4.
Showing the changes to tools/testing (1 of 1 file). Show all
Unified · Split
| @@ -402,7 +402,7 @@ int main(int argc, char *argv[]) · 401 unmodified lines | |||
| 402 | exit(1); | 402 | exit(1); |
| 403 | } | 403 | } |
| 404 | 404 | ||
| 405 | fd = socket(AF_INET6, SOCK_STREAM, 0); | 405 | fd = socket(cfg_family, SOCK_STREAM, 0); |
| 406 | if (fd == -1) { | 406 | if (fd == -1) { |
| 407 | perror("socket"); | 407 | perror("socket"); |
| 408 | exit(1); | 408 | exit(1); |