aboutsummaryrefslogtreecommitdiffstats
path: root/tun (follow)
Commit message (Collapse)AuthorAgeFilesLines
* global: fix a few typos courtesy of codespellJonathan Tooker2019-10-222-2/+2
| | | | Signed-off-by: Jonathan Tooker <jonathan.tooker@netprotect.com>
* namespaceapi: remove tasteless commentJason A. Donenfeld2019-10-211-1/+1
|
* wintun: normalize variable names for their typesJason A. Donenfeld2019-10-171-72/+72
|
* wintun: quickly ignore non-Wintun devicesAvery Pennarun2019-10-171-0/+18
| | | | | | | | | Some devices take ~2 seconds to enumerate on Windows if we try to get their instance name. The hardware id property, on the other hand, is available right away. Signed-off-by: Avery Pennarun <apenwarr@gmail.com> [zx2c4: inlined this to where it makes sense, reused setupapi const]
* tun: match windows CreateTUN signature to the Linux variantAvery Pennarun2019-10-171-4/+9
| | | | | Signed-off-by: Avery Pennarun <apenwarr@gmail.com> [zx2c4: fix default value]
* wintun: expose versionJason A. Donenfeld2019-10-082-1/+34
|
* mod: bump versionsJason A. Donenfeld2019-10-046-6/+6
|
* winpipe: use x/sys/windows instead of syscallJason A. Donenfeld2019-09-161-3/+2
|
* wintun: use correct length for security attributesJason A. Donenfeld2019-09-161-1/+1
|
* tun: windows: unify error message formatJason A. Donenfeld2019-09-081-2/+2
|
* tun: openbsd: check for interface already being upJason A. Donenfeld2019-09-071-23/+31
| | | | | | | | | | | | In some cases, we operate on an already-up interface, or the user brings up the interface before we start monitoring. For those situations, we should first check if the interface is already up. This still technically races between the initial check and the start of the route loop, but fixing that is a bit ugly and probably not worth it at the moment. Reported-by: Theo Buehler <tb@theobuehler.org>
* namespaceapi: AddSIDToBoundaryDescriptor modifies the handleJason A. Donenfeld2019-09-051-2/+2
|
* wintun: take mutex first alwaysJason A. Donenfeld2019-09-011-9/+9
| | | | This prevents an ABA deadlock with setupapi's internal locks.
* wintun: consider abandoned mutexes as releasedJason A. Donenfeld2019-09-011-1/+1
|
* wintun: put mutex into private namespaceJason A. Donenfeld2019-08-303-26/+99
|
* namespaceapi: fix mistakeJason A. Donenfeld2019-08-302-4/+4
|
* namespaceapi: initial versionSimon Rozman2019-08-303-0/+207
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* wintun: take mutex so that deletion uses the right nameJason A. Donenfeld2019-08-302-16/+71
|
* wintun: move ring constants into moduleJason A. Donenfeld2019-08-293-96/+133
|
* wintun: delete all interfaces is not used anymoreJason A. Donenfeld2019-08-291-9/+0
|
* wintun: Wintun->InterfaceJason A. Donenfeld2019-08-292-37/+36
|
* wintun: keep reference to pool in wintun objectJason A. Donenfeld2019-08-291-7/+9
|
* wintun: introduce adapter poolsSimon Rozman2019-08-292-26/+50
| | | | | | This makes wintun package reusable for non-WireGuard applications. Signed-off-by: Simon Rozman <simon@rozman.si>
* wintun: simplify rename logicJason A. Donenfeld2019-08-281-5/+4
|
* wintun: give better errors when ndis interface listing failsJason A. Donenfeld2019-08-281-2/+2
|
* wintun: also check for numbered suffix and friendly nameJason A. Donenfeld2019-08-281-9/+22
|
* wintun: upgrade deleting all interfaces and make it reusableSimon Rozman2019-08-281-4/+29
| | | | | | | | | | | DeleteAllInterfaces() didn't check if SPDRP_DEVICEDESC == "WireGuard Tunnel". It deleted _all_ Wintun adapters, not just WireGuard's. Furthermore, the DeleteAllInterfaces() was upgraded into a new function called DeleteMatchingInterfaces() for selectively deletion. This will be used by WireGuard to clean stale Wintun adapters. Signed-off-by: Simon Rozman <simon@rozman.si>
* wintun: cleanup earlierJason A. Donenfeld2019-08-271-19/+20
|
* wintun: rename duplicate adapters instead of ourselvesJason A. Donenfeld2019-08-274-0/+118
|
* wintun: match suffix numbersJason A. Donenfeld2019-08-261-1/+8
|
* wintun: make description consistent across fieldsJason A. Donenfeld2019-08-242-13/+10
|
* wintun: try multiple names until one isn't a duplicateJason A. Donenfeld2019-08-221-4/+12
|
* wintun: use nci.dll directly instead of buggy netshellJason A. Donenfeld2019-08-215-84/+102
|
* wintun: set friendly a bit betterJason A. Donenfeld2019-08-201-22/+10
| | | | | This is still wrong, but NETSETUPPKEY_Driver_FriendlyName seems a bit tricky to use.
* wintun: also set friendly name after setting interface nameJason A. Donenfeld2019-08-191-8/+23
|
* wintun: defer requires unique variableJason A. Donenfeld2019-08-191-33/+22
|
* wintun: set adapter description nameJason A. Donenfeld2019-08-191-0/+24
|
* tun: windows: don't spin unless we really need itJason A. Donenfeld2019-08-191-10/+42
|
* tun: windows: spin for only a millisecond/80Jason A. Donenfeld2019-08-031-1/+1
| | | | Performance stays the same as before.
* wintun: merge opening device registry keySimon Rozman2019-08-021-21/+15
| | | | | | | | | This also introduces waiting for key to appear on initial access. See if this resolves the issue caused by HDD power-up delay resulting in failure to create the adapter. Signed-off-by: Simon Rozman <simon@rozman.si>
* wintun: simplify checking reboot requirementSimon Rozman2019-08-021-18/+7
| | | | | | We never checked checkReboot() reported error anyway. Signed-off-by: Simon Rozman <simon@rozman.si>
* wintun: refactor `err == nil` error checkingSimon Rozman2019-08-022-133/+166
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* wintun: handle error for deadgwdetectJason A. Donenfeld2019-08-021-2/+3
|
* tun: darwin: do not attempt to close tun.event twiceJason A. Donenfeld2019-08-021-4/+1
| | | | | Previously it was possible for this to race. It turns out we really don't need to set anything to -1 anyway.
* wintun: get interface path properly with cfgmgrJason A. Donenfeld2019-07-234-30/+93
|
* tun: windows: styleJason A. Donenfeld2019-07-231-1/+1
|
* wintun: simplify resolution of dev nodeJason A. Donenfeld2019-07-231-13/+10
|
* wintun: enable sharing of pnp nodeJason A. Donenfeld2019-07-221-1/+1
|
* tun: windows: close event handle on shutdownJason A. Donenfeld2019-07-221-0/+1
|
* tun: windows: get rid of retry logicJason A. Donenfeld2019-07-192-218/+100
| | | | Things work fine on Windows 8.