Skip to content

Commit

Permalink
selftest/net: fix protocol family to work for IPv4.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Vaneet Narang <[email protected]>
Reviewed-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
maninder42 authored and davem330 committed Aug 2, 2018
1 parent e30cb13 commit 258fe20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/testing/selftests/net/tcp_mmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 258fe20

Please sign in to comment.