mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-22 21:16:07 +03:00
Fix segfault in windows tun reader thread
The arguments to open_dns() needs to be updated after API change. Called with 0, INADDR_ANY used to mean port, IP address but now means pointer to sockadddr and its length. Thanks to C for not giving any warnings or errors..
This commit is contained in:
parent
c52ba7f606
commit
5b71224def
@ -285,9 +285,12 @@ DWORD WINAPI tun_reader(LPVOID arg)
|
|||||||
int len;
|
int len;
|
||||||
int res;
|
int res;
|
||||||
OVERLAPPED olpd;
|
OVERLAPPED olpd;
|
||||||
|
struct sockaddr_storage addr;
|
||||||
|
int addr_len;
|
||||||
int sock;
|
int sock;
|
||||||
|
|
||||||
sock = open_dns(0, INADDR_ANY);
|
addr_len = get_addr("127.0.0.1", 0, AF_INET, 0, &addr);
|
||||||
|
sock = open_dns(&addr, addr_len);
|
||||||
|
|
||||||
olpd.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
|
olpd.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user