From 95dedf51db48eaed583c9f311f12cec13fe0522e Mon Sep 17 00:00:00 2001 From: Erik Ekman Date: Sat, 31 May 2014 21:22:03 +0200 Subject: [PATCH] Simplify opening UDP socket in win32 tun reader --- src/tun.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/tun.c b/src/tun.c index 880f7ef..adb6c10 100644 --- a/src/tun.c +++ b/src/tun.c @@ -285,12 +285,9 @@ DWORD WINAPI tun_reader(LPVOID arg) int len; int res; OVERLAPPED olpd; - struct sockaddr_storage addr; - int addr_len; int sock; - addr_len = get_addr("127.0.0.1", 0, AF_INET, 0, &addr); - sock = open_dns(&addr, addr_len); + sock = open_dns_from_host("127.0.0.1", 0, AF_INET, 0); olpd.hEvent = CreateEvent(NULL, TRUE, FALSE, NULL);