aboutsummaryrefslogtreecommitdiffstats
path: root/device/allowedips_rand_test.go (unfollow)
Commit message (Collapse)AuthorFilesLines
2019-05-31tun: windows: mitigate infinite loop in Flush()Jason A. Donenfeld1-29/+35
It's possible that for whatever reason, we keep returning EOF, resulting in repeated close/open/write operations, except with empty packets.
2019-05-30device: add SendKeepalivesToPeersWithCurrentKeypair for handoverJason A. Donenfeld1-0/+17
2019-05-29tai64n: account for whitening in testJason A. Donenfeld1-3/+7
2019-05-29device, tun: rearrange code and fix device testsMatt Layher3-103/+86
Signed-off-by: Matt Layher <mdlayher@gmail.com>
2019-05-26wintun: remove extra /Jason A. Donenfeld1-1/+1
2019-05-25device: darwin actually doesn't need bound interfacesJason A. Donenfeld1-44/+0
2019-05-25device: make initiations per second match kernel implementationJason A. Donenfeld1-1/+1
2019-05-24device: timers: add jitter on ack failure reinitiationJason A. Donenfeld1-1/+1
2019-05-24wintun: revise GetInterface()Simon Rozman2-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>
2019-05-23wintun: never return nil, nilJason A. Donenfeld1-1/+1
2019-05-23ipc: use simplified fork of winioJason A. Donenfeld8-20/+1162
2019-05-22setupapi: trim "Get" from gettersSimon Rozman5-53/+53
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-05-17wintun: don't try to flush interface, but rather deleteJason A. Donenfeld2-25/+8
2019-05-17device: fail to give bind if it doesn't existJason A. Donenfeld2-2/+13
2019-05-17wintun: make certain methods privateJason A. Donenfeld2-33/+41
2019-05-17version: bump snapshot0.0.20190517Jason A. Donenfeld1-1/+1
2019-05-17makefile: do not show warning on non-linuxJason A. Donenfeld1-1/+1
2019-05-17wintun: change acronyms to uppercaseSimon Rozman1-5/+5
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-05-14global: regroup all importsJason A. Donenfeld27-44/+70
2019-05-11wintun: registry: fix nitsJason A. Donenfeld1-17/+20
2019-05-11wintun: registry: revise value readingSimon Rozman2-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>
2019-05-10wintun: call HrRenameConnection in another threadJason A. Donenfeld1-2/+3
2019-05-10wintun: add LUID accessorJason A. Donenfeld1-0/+7
2019-05-10wintun: enumerate faster by using COMPATDRIVER instead of CLASSDRIVERJason A. Donenfeld1-1/+1
2019-05-10wintun: destroy devinfolist after usageJason A. Donenfeld1-0/+1
2019-05-10wintun: registry: replace REG_NOTIFY with NOTIFYSimon Rozman3-13/+9
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-05-10wintun: IpConfig is a MULTI_SZ, and fix errorsJason A. Donenfeld2-49/+72
2019-05-10wintun: poll for device keyJason A. Donenfeld1-9/+10
It's actually pretty hard to guess where it is.
2019-05-10wintun: fix scope of error objectJason A. Donenfeld1-5/+6
2019-05-10wintun: wait for interface registry key on device creationSimon Rozman7-133/+534
By using RegNotifyChangeKeyValue(). Also disable dead gateway detection. Signed-off-by: Simon Rozman <simon@rozman.si>
2019-05-09conn: remove scope when sanity checking IP address formatJason A. Donenfeld1-1/+7
2019-05-09wintun: fix GUID leading zero paddingSimon Rozman1-1/+1
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-05-03mod: update depsJason A. Donenfeld2-11/+14
2019-05-03setupapi: safer aliasing of slice typesJason A. Donenfeld5-23/+40
2019-05-03wintun: work around GetInterface staleness bugJason A. Donenfeld2-18/+30
2019-05-02wintun: don't retry when not creatingJason A. Donenfeld2-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.
2019-04-29wintun: try harder to open registry keyJason A. Donenfeld1-2/+2
This sucks. Can we please find a deterministic way of doing this instead?
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