Skip to content

Commit fdf4064

Browse files
committed
selftest/net/ovpn: fix TCP socket creation
TCP sockets cannot be created with AF_UNSPEC, but one among the supported family must be used. Since commit 944f8b6 ("selftest/net/ovpn: extend coverage with more test cases") the default address family for all tests was changed from AF_INET to AF_UNSPEC, thus breaking all TCP cases. Restore AF_INET as default address family for TCP listeners. Fixes: 944f8b6 ("selftest/net/ovpn: extend coverage with more test cases") Signed-off-by: Antonio Quartulli <[email protected]>
1 parent a6a5e87 commit fdf4064

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tools/testing/selftests/net/ovpn/ovpn-cli.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2166,6 +2166,7 @@ static int ovpn_parse_cmd_args(struct ovpn_ctx *ovpn, int argc, char *argv[])
21662166

21672167
ovpn->peers_file = argv[4];
21682168

2169+
ovpn->sa_family = AF_INET;
21692170
if (argc > 5 && !strcmp(argv[5], "ipv6"))
21702171
ovpn->sa_family = AF_INET6;
21712172
break;

0 commit comments

Comments
 (0)