aboutsummaryrefslogtreecommitdiffstats
path: root/tun (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* tun: windows: use specific IOCTL codeJason A. Donenfeld2019-07-191-1/+1
|
* tun: windows: open file at startup timeJason A. Donenfeld2019-07-181-0/+9
|
* tun: windows: silently drop packet when ring is fullJason A. Donenfeld2019-07-181-2/+2
|
* tun: windows: switch to NDIS device objectJason A. Donenfeld2019-07-182-7/+6
|
* wintun: calculate path of NDIS device object symbolic linkJason A. Donenfeld2019-07-181-0/+20
|
* tun: openbsd: don't change MTU when it's already the expected sizeMichael Zeltner2019-07-181-4/+7
| | | | | | Allows for running wireguard-go as non-root user. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* tun: windows: spin for a bit before falling back to event objectJason A. Donenfeld2019-07-181-4/+19
|
* tun: windows: implement ring buffersSimon Rozman2019-07-171-186/+184
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* tun: windows: registration of write buffer no longer requiredJason A. Donenfeld2019-07-051-12/+1
|
* tun: windows: decrease alignment to 4Jason A. Donenfeld2019-07-051-3/+3
|
* tun: windows: delay initial writeJason A. Donenfeld2019-07-041-16/+22
| | | | Otherwise we provoke Wintun 0.3.
* tun: windows: packetNum is unusedJason A. Donenfeld2019-07-011-3/+0
|
* tun: windows: inform wintun of maximum buffer length for writesJason A. Donenfeld2019-06-261-0/+6
|
* tun: windows: never retry open on Windows 10Jason A. Donenfeld2019-06-182-4/+13
|
* tun: remove TUN prefix from types to reduce stutter elsewhereMatt Layher2019-06-146-51/+51
| | | | Signed-off-by: Matt Layher <mdlayher@gmail.com>
* wintun: increase registry timeoutJason A. Donenfeld2019-06-111-1/+1
|
* wintun: add helper for cleaning upJason A. Donenfeld2019-06-101-9/+82
|
* wintun: simplify error matching and remove dumb commentsJason A. Donenfeld2019-06-101-19/+4
|
* wintun: fix comments and remove hwnd paramJason A. Donenfeld2019-06-102-124/+55
| | | | This now looks more idiomatic.
* setupapi: add SetDeviceRegistryPropertyString descriptionSimon Rozman2019-06-101-1/+2
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* setupapi: unify ERROR_INSUFFICIENT_BUFFER handlingSimon Rozman2019-06-101-58/+32
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* wintun: allow controlling GUIDJason A. Donenfeld2019-06-102-2/+29
|