Commit fdf4064a authored by Antonio Quartulli's avatar Antonio Quartulli
Browse files

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 944f8b6a ("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: 944f8b6a ("selftest/net/ovpn: extend coverage with more test cases")
Signed-off-by: default avatarAntonio Quartulli <antonio@openvpn.net>
parent a6a5e87b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2166,6 +2166,7 @@ static int ovpn_parse_cmd_args(struct ovpn_ctx *ovpn, int argc, char *argv[])

		ovpn->peers_file = argv[4];

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