[PATCH 1/1] selftest/net: fix protocol family to work for IPv4.

Subsystems: kernel selftest framework, networking [general], the rest

STALE2935d

4 messages, 3 authors, 2018-08-02 · open the first message on its own page

[PATCH 1/1] selftest/net: fix protocol family to work for IPv4.

From: Maninder Singh <hidden>
Date: 2018-08-02 10:42:18

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 <redacted>
Signed-off-by: Vaneet Narang <redacted>
---
 tools/testing/selftests/net/tcp_mmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/tcp_mmap.c b/tools/testing/selftests/net/tcp_mmap.c
index 77f7627..e8c5dff 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);
-- 
1.9.1

Re: [PATCH 1/1] selftest/net: fix protocol family to work for IPv4.

From: Eric Dumazet <hidden>
Date: 2018-08-02 13:03:18


On 08/02/2018 02:57 AM, Maninder Singh wrote:
quoted hunk
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 <redacted>
Signed-off-by: Vaneet Narang <redacted>
---
 tools/testing/selftests/net/tcp_mmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/net/tcp_mmap.c b/tools/testing/selftests/net/tcp_mmap.c
index 77f7627..e8c5dff 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);

Darn, someone spotted my hidden attempt to kill IPv4 ;)

Reviewed-by: Eric Dumazet <edumazet@google.com>

Re: [PATCH 1/1] selftest/net: fix protocol family to work for IPv4.

From: David Miller <davem@davemloft.net>
Date: 2018-08-02 17:30:49

From: Maninder Singh <redacted>
Date: Thu,  2 Aug 2018 15:27:27 +0530
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 <redacted>
Signed-off-by: Vaneet Narang <redacted>
Applied.

Re: [PATCH 1/1] selftest/net: fix protocol family to work for IPv4.

From: David Miller <davem@davemloft.net>
Date: 2018-08-02 17:35:17

From: Maninder Singh <redacted>
Date: Thu,  2 Aug 2018 15:27:27 +0530
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 <redacted>
Signed-off-by: Vaneet Narang <redacted>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help