From dbc85417af4e2847b65542cb576d7eda3dd6144d Mon Sep 17 00:00:00 2001 From: ruti <> Date: Sun, 6 Oct 2024 19:08:45 +0300 Subject: [PATCH] Check IPv6 support Change family for default address only --- main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index 77f84ad..dc16943 100644 --- a/main.c +++ b/main.c @@ -484,6 +484,9 @@ int main(int argc, char **argv) } params.laddr.sin6_port = htons(1080); + if (!ipv6_support()) { + params.baddr.sin6_family = AF_INET; + } int rez; int invalid = 0; @@ -890,9 +893,6 @@ int main(int argc, char **argv) } } - if (!ipv6_support()) { - params.baddr.sin6_family = AF_INET; - } if (params.baddr.sin6_family != AF_INET6) { params.ipv6 = 0; }