Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | wintun: fix GUID leading zero padding | Simon Rozman | 2019-05-09 | 1 | -1/+1 |
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | setupapi: safer aliasing of slice types | Jason A. Donenfeld | 2019-05-03 | 5 | -23/+40 |
| | |||||
* | wintun: work around GetInterface staleness bug | Jason A. Donenfeld | 2019-05-03 | 2 | -18/+30 |
| | |||||
* | wintun: don't retry when not creating | Jason A. Donenfeld | 2019-05-02 | 2 | -9/+26 |
| | | | | | | The only time we're trying to counteract the race condition is when we're creating a driver. When we're simply looking up all drivers, it doesn't make sense to retry. | ||||
* | wintun: try harder to open registry key | Jason A. Donenfeld | 2019-04-29 | 1 | -2/+2 |
| | | | | | This sucks. Can we please find a deterministic way of doing this instead? | ||||
* | tun: freebsd: work around numerous kernel panics on shutdown | Jason A. Donenfeld | 2019-04-23 | 1 | -23/+82 |
| | | | | | | | | | There are numerous race conditions. But even this will crash it: while true; do ifconfig tun0 create; ifconfig tun0 destroy; done It seems like LLv6 is related, which we're not using anyway, so explicitly disable it on the interface. | ||||
* | setupapi: Fix struct size mismatches | Simon Rozman | 2019-04-19 | 4 | -8/+27 |
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | setupapi: actually fix padding by rounding up to sizeof(void*) | Jason A. Donenfeld | 2019-04-19 | 1 | -1/+1 |
| | |||||
* | tun: darwin: write routeSocket variable in helper | Jason A. Donenfeld | 2019-04-19 | 1 | -2/+4 |
| | | | | Otherwise the race detector "complains". | ||||
* | setupapi: Revise DrvInfoDetailData struct size calculation | Simon Rozman | 2019-04-18 | 2 | -3/+7 |
| | | | | | | | Go adds trailing padding to DrvInfoDetailData struct in GOARCH=386 which confuses SetupAPI expecting exactly sizeof(SP_DRVINFO_DETAIL_DATA). Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | windows: use proper constants from updated x/sys | Jason A. Donenfeld | 2019-04-13 | 3 | -16/+16 |
| | |||||
* | tun: windows: Adopt new error codes returned by Wintun | Simon Rozman | 2019-04-11 | 1 | -3/+2 |
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | tun: windows: do not sleep after OPERATION_ABORTED on write | Simon Rozman | 2019-04-11 | 1 | -2/+1 |
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | tun: windows: do not sleep after OPERATION_ABORTED | Jason A. Donenfeld | 2019-04-09 | 1 | -2/+1 |
| | |||||
* | tun: windows: Retry R/W on ERROR_OPERATION_ABORTED | Simon Rozman | 2019-04-04 | 1 | -18/+44 |
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | tun: windows: Attempt to reopen handle on all errors | Simon Rozman | 2019-04-03 | 1 | -15/+9 |
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | wintun: rename device using undocumented API that netsh.exe uses | Jason A. Donenfeld | 2019-04-01 | 2 | -1/+41 |
| | |||||
* | wintun: add more retry loops | Jason A. Donenfeld | 2019-04-01 | 3 | -30/+56 |
| | |||||
* | tun: windows: cancel ongoing reads on closing and delete after close | Jason A. Donenfeld | 2019-03-26 | 1 | -4/+11 |
| | | | | | This reverts commit 52ec440d7977fad966002c3710ed9df957943407 and adds some spice. | ||||
* | wintun: query for NetCfgInstanceId several times | Jason A. Donenfeld | 2019-03-22 | 1 | -5/+16 |
| | |||||
* | tun: windows: delete interface before deleting file handles | Jason A. Donenfeld | 2019-03-22 | 1 | -9/+4 |
| | |||||
* | tun: windows: Make adapter rename asynchronous | Simon Rozman | 2019-03-22 | 2 | -60/+13 |
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | tun: windows: Adapter devices renamed to WINTUN<LUID Index> | Simon Rozman | 2019-03-22 | 4 | -52/+63 |
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | tun: windows: Increase unavailable adapter timeout to 30sec | Simon Rozman | 2019-03-22 | 1 | -1/+1 |
| | | | | | | 5 seconds was too short when debugging. Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | tun: windows: Make writing persistent too | Simon Rozman | 2019-03-22 | 1 | -15/+17 |
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | tun: windows: Fix paused adapter test | Simon Rozman | 2019-03-22 | 1 | -1/+1 |
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | tun: windows: just open two file handles | Jason A. Donenfeld | 2019-03-21 | 3 | -162/+83 |
| | |||||
* | receive: implement flush semantics | Jason A. Donenfeld | 2019-03-21 | 7 | -5/+28 |
| | |||||
* | tun: windows: add dummy overlapped events back | Jason A. Donenfeld | 2019-03-21 | 1 | -2/+21 |
| | | | | These seem basically wrong to me, but we get crashes without them. | ||||
* | tun: windows: use new constants in sys | Jason A. Donenfeld | 2019-03-20 | 1 | -1/+1 |
| | |||||
* | wintun: Use native Win32 API for I/O | Simon Rozman | 2019-03-21 | 5 | -38/+173 |
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | tun: windows: wintun does iocp | Jason A. Donenfeld | 2019-03-18 | 2 | -142/+49 |
| | |||||
* | tun: windows: temporary hack for forcing MTU | Jason A. Donenfeld | 2019-03-13 | 1 | -1/+8 |
| | |||||
* | wintun: Poll more often | Jason A. Donenfeld | 2019-03-10 | 1 | -1/+1 |
| | |||||
* | wintun: Make errors more descriptive | Simon Rozman | 2019-03-08 | 1 | -15/+20 |
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | wintun: Return correct reboot-req flag on CreateInterface() error too | Simon Rozman | 2019-03-08 | 1 | -1/+1 |
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | wintun: Fix double-quoted strings escaping on output | Simon Rozman | 2019-03-08 | 2 | -4/+4 |
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | wintun: Introduce SetupAPI enumerator and machineName consts | Simon Rozman | 2019-03-08 | 1 | -4/+7 |
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | wintun: Cleanup | Simon Rozman | 2019-03-07 | 1 | -1/+1 |
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | wintun: Refactor network registry key name generation | Simon Rozman | 2019-03-07 | 1 | -22/+18 |
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | wintun: Revise interface creation wait | Simon Rozman | 2019-03-07 | 3 | -59/+106 |
| | | | | | | | | | | | | | | | | | | | | DIF_INSTALLDEVICE returns almost immediately, while the device installation continues in the background. It might take a while, before all registry keys and values are populated. Previously, wireguard-go waited for HKLM\SYSTEM\CurrentControlSet\ Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\<id> registry key only. Followed by a SetInterfaceName() method of Wintun struct which tried to access HKLM\SYSTEM\CurrentControlSet\Control\Network\ {4D36E972-E325-11CE-BFC1-08002BE10318}\<id>\Connection registry key might not be available yet. This commit loops until both registry keys are available before returning from CreateInterface() function. Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | tun: linux: work out netpoll trick | Jason A. Donenfeld | 2019-03-07 | 1 | -54/+46 |
| | |||||
* | wintun: Resolve some of golint warnings | Simon Rozman | 2019-03-04 | 4 | -17/+33 |
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | Elaborate the failing step when forwarding errors on return | Simon Rozman | 2019-03-04 | 1 | -3/+3 |
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | Simplify reading NetCfgInstanceId from registry | Simon Rozman | 2019-03-04 | 1 | -8/+2 |
| | | | | | | | | As querying non-existing registry value and reading non-existing registry string value both return ERROR_FILE_NOT_FOUND, we can use later only. Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | Unify interface-specific network registry key open | Simon Rozman | 2019-03-04 | 1 | -10/+19 |
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> | ||||
* | tun: import mobile particularities | Jason A. Donenfeld | 2019-03-04 | 2 | -5/+29 |
| | |||||
* | global: begin modularization | Jason A. Donenfeld | 2019-03-03 | 2 | -1/+93 |
| | |||||
* | tun: windows: expose GUID | Jason A. Donenfeld | 2019-03-01 | 1 | -0/+4 |
| | |||||
* | tun: allow special methods in NativeTun | Jason A. Donenfeld | 2019-03-01 | 6 | -65/+65 |
| |