aboutsummaryrefslogtreecommitdiffstats
path: root/rwcancel (unfollow)
Commit message (Collapse)AuthorFilesLines
2019-04-29go.mod: use vendored winioJason A. Donenfeld2-1/+4
2019-04-23tun: freebsd: work around numerous kernel panics on shutdownJason A. Donenfeld1-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.
2019-04-19setupapi: Fix struct size mismatchesSimon Rozman4-8/+27
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-04-19setupapi: actually fix padding by rounding up to sizeof(void*)Jason A. Donenfeld1-1/+1
2019-04-19tun: darwin: write routeSocket variable in helperJason A. Donenfeld1-2/+4
Otherwise the race detector "complains".
2019-04-19main: revise warningsJason A. Donenfeld2-25/+17
2019-04-18device: send: check packet length before freeing elementJason A. Donenfeld1-3/+3
2019-04-18setupapi: Revise DrvInfoDetailData struct size calculationSimon Rozman2-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>
2019-04-13windows: use proper constants from updated x/sysJason A. Donenfeld5-25/+28
2019-04-13conn: linux: RTA_MARK has moved to x/sysJason A. Donenfeld1-1/+1
2019-04-11tun: windows: Adopt new error codes returned by WintunSimon Rozman1-3/+2
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-04-11tun: windows: do not sleep after OPERATION_ABORTED on writeSimon Rozman1-2/+1
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-04-09main_windows: use proper version constantJason A. Donenfeld1-1/+1
2019-04-09version: put version in right place0.0.20190409Jason A. Donenfeld2-4/+1
2019-04-09version: bump snapshotJason A. Donenfeld1-1/+1
2019-04-09tun: windows: do not sleep after OPERATION_ABORTEDJason A. Donenfeld1-2/+1
2019-04-04tun: windows: Retry R/W on ERROR_OPERATION_ABORTEDSimon Rozman1-18/+44
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-04-03tun: windows: Attempt to reopen handle on all errorsSimon Rozman1-15/+9
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-04-01wintun: rename device using undocumented API that netsh.exe usesJason A. Donenfeld2-1/+41
2019-04-01wintun: add more retry loopsJason A. Donenfeld3-30/+56
2019-03-26tun: windows: cancel ongoing reads on closing and delete after closeJason A. Donenfeld1-4/+11
This reverts commit 52ec440d7977fad966002c3710ed9df957943407 and adds some spice.
2019-03-22wintun: query for NetCfgInstanceId several timesJason A. Donenfeld1-5/+16
2019-03-22tun: windows: delete interface before deleting file handlesJason A. Donenfeld1-9/+4
2019-03-22tun: windows: Make adapter rename asynchronousSimon Rozman2-60/+13
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-03-22tun: windows: Adapter devices renamed to WINTUN<LUID Index>Simon Rozman4-52/+63
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-03-22tun: windows: Increase unavailable adapter timeout to 30secSimon Rozman1-1/+1
5 seconds was too short when debugging. Signed-off-by: Simon Rozman <simon@rozman.si>
2019-03-22tun: windows: Make writing persistent tooSimon Rozman1-15/+17
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-03-22tun: windows: Fix paused adapter testSimon Rozman1-1/+1
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-03-21tun: windows: just open two file handlesJason A. Donenfeld3-162/+83
2019-03-21receive: implement flush semanticsJason A. Donenfeld12-98/+147
2019-03-21tun: windows: add dummy overlapped events backJason A. Donenfeld1-2/+21
These seem basically wrong to me, but we get crashes without them.
2019-03-20tun: windows: use new constants in sysJason A. Donenfeld3-13/+15
2019-03-20uapi: remove unhelpful log messagesJason A. Donenfeld1-7/+0
2019-03-21wintun: Use native Win32 API for I/OSimon Rozman5-38/+173
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-03-19uapi: report endpoint errorJason A. Donenfeld1-1/+1
2019-03-18tun: windows: wintun does iocpJason A. Donenfeld2-142/+49
2019-03-13tun: windows: temporary hack for forcing MTUJason A. Donenfeld1-1/+8
2019-03-10wintun: Poll more oftenJason A. Donenfeld1-1/+1
2019-03-10uapi: make ipcerror conform to interfaceJason A. Donenfeld1-2/+2
2019-03-08wintun: Make errors more descriptiveSimon Rozman1-15/+20
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-03-08wintun: Return correct reboot-req flag on CreateInterface() error tooSimon Rozman1-1/+1
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-03-08wintun: Fix double-quoted strings escaping on outputSimon Rozman2-4/+4
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-03-08wintun: Introduce SetupAPI enumerator and machineName constsSimon Rozman1-4/+7
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-03-08Windows: Apply strict security descriptor on pipe serverOdd Stranne1-1/+12
Signed-off-by: Odd Stranne <odd@mullvad.net>
2019-03-08uapi: windows: work out pipe semanticsJason A. Donenfeld1-2/+2
Pipes can be arranged like this, so that's fine. We also apply a strict SDDL that can't be inherited and only gives access to local system. Developed-with: Odd Stranne <odd@mullvad.net>
2019-03-07wintun: CleanupSimon Rozman1-1/+1
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-03-07wintun: Refactor network registry key name generationSimon Rozman1-22/+18
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-03-07wintun: Revise interface creation waitSimon Rozman3-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>
2019-03-07receive: squelch tear down errorJason A. Donenfeld1-1/+1
2019-03-07tun: linux: work out netpoll trickJason A. Donenfeld1-54/+46