diff options
author | Maninder Singh <maninder1.s@samsung.com> | 2018-08-02 15:27:27 +0530 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-08-02 10:30:12 -0700 |
commit | 258fe208f2829d75ac837c17dbdc697ef653a395 (patch) | |
tree | 5e7518f97eaec1f49c3a08959af9fb7760da42c9 /tools/testing | |
parent | e30cb13c5a09ff5f043a6570c32e49b063bea6a1 (diff) |
selftest/net: fix protocol family to work for IPv4.
use actual protocol family passed by user rather than hardcoded
AF_INTE6 to cerate sockets.
current code is not working for IPv4.
Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Signed-off-by: Vaneet Narang <v.narang@samsung.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing')
-rw-r--r-- | tools/testing/selftests/net/tcp_mmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/net/tcp_mmap.c b/tools/testing/selftests/net/tcp_mmap.c index 77f762780199..e8c5dff448eb 100644 --- a/tools/testing/selftests/net/tcp_mmap.c +++ b/tools/testing/selftests/net/tcp_mmap.c @@ -402,7 +402,7 @@ int main(int argc, char *argv[]) exit(1); } - fd = socket(AF_INET6, SOCK_STREAM, 0); + fd = socket(cfg_family, SOCK_STREAM, 0); if (fd == -1) { perror("socket"); exit(1); |