提交 258fe208 编写于 作者: M Maninder Singh 提交者: David S. Miller

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: NManinder Singh <maninder1.s@samsung.com>
Signed-off-by: NVaneet Narang <v.narang@samsung.com>
Reviewed-by: NEric Dumazet <edumazet@google.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 e30cb13c
...@@ -402,7 +402,7 @@ int main(int argc, char *argv[]) ...@@ -402,7 +402,7 @@ int main(int argc, char *argv[])
exit(1); exit(1);
} }
fd = socket(AF_INET6, SOCK_STREAM, 0); fd = socket(cfg_family, SOCK_STREAM, 0);
if (fd == -1) { if (fd == -1) {
perror("socket"); perror("socket");
exit(1); exit(1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册