mirror of
https://github.com/hufrea/byedpi.git
synced 2024-12-22 14:25:44 +00:00
Check IPv6 support
Change family for default address only
This commit is contained in:
parent
c71a096168
commit
dbc85417af
6
main.c
6
main.c
@ -484,6 +484,9 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
params.laddr.sin6_port = htons(1080);
|
params.laddr.sin6_port = htons(1080);
|
||||||
|
if (!ipv6_support()) {
|
||||||
|
params.baddr.sin6_family = AF_INET;
|
||||||
|
}
|
||||||
|
|
||||||
int rez;
|
int rez;
|
||||||
int invalid = 0;
|
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) {
|
if (params.baddr.sin6_family != AF_INET6) {
|
||||||
params.ipv6 = 0;
|
params.ipv6 = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user