aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* wintun: remove extra /Jason A. Donenfeld2019-05-261-1/+1
|
* device: darwin actually doesn't need bound interfacesJason A. Donenfeld2019-05-251-44/+0
|
* device: make initiations per second match kernel implementationJason A. Donenfeld2019-05-251-1/+1
|
* device: timers: add jitter on ack failure reinitiationJason A. Donenfeld2019-05-241-1/+1
|
* wintun: revise GetInterface()Simon Rozman2019-05-242-3/+6
| | | | | | | | | | | - Make foreign interface found error numeric to ease condition detection. - Update GetInterface() documentation. - Make tun.CreateTUN() quit when foreign interface found before attempting to create a Wintun interface with a duplicate name. Creation is futile. Signed-off-by: Simon Rozman <simon@rozman.si>
* wintun: never return nil, nilJason A. Donenfeld2019-05-231-1/+1
|
* ipc: use simplified fork of winioJason A. Donenfeld2019-05-238-20/+1162
|
* setupapi: trim "Get" from gettersSimon Rozman2019-05-225-53/+53
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* wintun: don't try to flush interface, but rather deleteJason A. Donenfeld2019-05-172-25/+8
|
* device: fail to give bind if it doesn't existJason A. Donenfeld2019-05-172-2/+13
|
* wintun: make certain methods privateJason A. Donenfeld2019-05-172-33/+41
|
* version: bump snapshot0.0.20190517Jason A. Donenfeld2019-05-171-1/+1
|
* makefile: do not show warning on non-linuxJason A. Donenfeld2019-05-171-1/+1
|
* wintun: change acronyms to uppercaseSimon Rozman2019-05-171-5/+5
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* global: regroup all importsJason A. Donenfeld2019-05-1427-44/+70
|
* wintun: registry: fix nitsJason A. Donenfeld2019-05-111-17/+20
|
* wintun: registry: revise value readingSimon Rozman2019-05-112-67/+82
| | | | | | | | | | | | | | - Make getStringValueRetry() reusable for reading any value type. This merges code from GetIntegerValueWait(). - expandString() >> toString() and extend to support REG_MULTI_SZ (to return first value of REG_MULTI_SZ). Furthermore, doing our own UTF-16 to UTF-8 conversion works around a bug in windows/registry's GetStringValue() non-zero terminated string handling. - Provide toInteger() analogous to toString() - GetStringValueWait() tolerates and reads REG_MULTI_SZ too now. It returns REG_MULTI_SZ[0], making GetFirstStringValueWait() redundant. Signed-off-by: Simon Rozman <simon@rozman.si>
* wintun: call HrRenameConnection in another threadJason A. Donenfeld2019-05-101-2/+3
|
* wintun: add LUID accessorJason A. Donenfeld2019-05-101-0/+7
|
* wintun: enumerate faster by using COMPATDRIVER instead of CLASSDRIVERJason A. Donenfeld2019-05-101-1/+1
|
* wintun: destroy devinfolist after usageJason A. Donenfeld2019-05-101-0/+1
|
* wintun: registry: replace REG_NOTIFY with NOTIFYSimon Rozman2019-05-103-13/+9
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* wintun: IpConfig is a MULTI_SZ, and fix errorsJason A. Donenfeld2019-05-102-49/+72
|
* wintun: poll for device keyJason A. Donenfeld2019-05-101-9/+10
| | | | It's actually pretty hard to guess where it is.
* wintun: fix scope of error objectJason A. Donenfeld2019-05-101-5/+6
|
* wintun: wait for interface registry key on device creationSimon Rozman2019-05-107-133/+534
| | | | | | By using RegNotifyChangeKeyValue(). Also disable dead gateway detection. Signed-off-by: Simon Rozman <simon@rozman.si>
* conn: remove scope when sanity checking IP address formatJason A. Donenfeld2019-05-091-1/+7
|
* wintun: fix GUID leading zero paddingSimon Rozman2019-05-091-1/+1
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* mod: update depsJason A. Donenfeld2019-05-032-11/+14
|
* setupapi: safer aliasing of slice typesJason A. Donenfeld2019-05-035-23/+40
|
* wintun: work around GetInterface staleness bugJason A. Donenfeld2019-05-032-18/+30
|
* wintun: don't retry when not creatingJason A. Donenfeld2019-05-022-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 keyJason A. Donenfeld2019-04-291-2/+2
| | | | | This sucks. Can we please find a deterministic way of doing this instead?
* go.mod: use vendored winioJason A. Donenfeld2019-04-292-1/+4
|
* tun: freebsd: work around numerous kernel panics on shutdownJason A. Donenfeld2019-04-231-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 mismatchesSimon Rozman2019-04-194-8/+27
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* setupapi: actually fix padding by rounding up to sizeof(void*)Jason A. Donenfeld2019-04-191-1/+1
|
* tun: darwin: write routeSocket variable in helperJason A. Donenfeld2019-04-191-2/+4
| | | | Otherwise the race detector "complains".
* main: revise warningsJason A. Donenfeld2019-04-192-25/+17
|
* device: send: check packet length before freeing elementJason A. Donenfeld2019-04-181-3/+3
|
* setupapi: Revise DrvInfoDetailData struct size calculationSimon Rozman2019-04-182-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/sysJason A. Donenfeld2019-04-135-25/+28
|
* conn: linux: RTA_MARK has moved to x/sysJason A. Donenfeld2019-04-131-1/+1
|
* tun: windows: Adopt new error codes returned by WintunSimon Rozman2019-04-111-3/+2
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* tun: windows: do not sleep after OPERATION_ABORTED on writeSimon Rozman2019-04-111-2/+1
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* main_windows: use proper version constantJason A. Donenfeld2019-04-091-1/+1
|
* version: put version in right place0.0.20190409Jason A. Donenfeld2019-04-092-4/+1
|
* version: bump snapshotJason A. Donenfeld2019-04-091-1/+1
|
* tun: windows: do not sleep after OPERATION_ABORTEDJason A. Donenfeld2019-04-091-2/+1
|
* tun: windows: Retry R/W on ERROR_OPERATION_ABORTEDSimon Rozman2019-04-041-18/+44
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>