aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-10-17wintun: normalize variable names for their typesJason A. Donenfeld
2019-10-17wintun: quickly ignore non-Wintun devicesAvery Pennarun
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]
2019-10-17tun: match windows CreateTUN signature to the Linux variantAvery Pennarun
Signed-off-by: Avery Pennarun <apenwarr@gmail.com> [zx2c4: fix default value]
2019-10-17rwcancel: handle EINTR and EAGAIN in unixSelect()Avery Pennarun
On my Chromebook (Linux 4.19.44 in a VM) and on an AWS EC2 machine, select() was sometimes returning EINTR. This is harmless and just means you should try again. So let's try again. This eliminates a problem where the tunnel fails to come up correctly and the program needs to be restarted. Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
2019-10-16device: test packets between two fake devicesDavid Crawshaw
Signed-off-by: David Crawshaw <crawshaw@tailscale.io>
2019-10-12version: bump snapshot0.0.20191012Jason A. Donenfeld
2019-10-08Makefile: remove v prefixJason A. Donenfeld
2019-10-08wintun: expose versionJason A. Donenfeld
2019-10-04uapi: allow preventing creation of new peers when updatingJason A. Donenfeld
This enables race-free updates for wg-dynamic and similar tools. Suggested-by: Thomas Gschwantner <tharre3@gmail.com>
2019-10-04mod: bump versionsJason A. Donenfeld
2019-09-16winpipe: use x/sys/windows instead of syscallJason A. Donenfeld
2019-09-16wintun: use correct length for security attributesJason A. Donenfeld
2019-09-08tun: windows: unify error message formatJason A. Donenfeld
2019-09-08version: bump snapshot0.0.20190908Jason A. Donenfeld
2019-09-08main: simplify warningsJason A. Donenfeld
2019-09-07tun: openbsd: check for interface already being upJason A. Donenfeld
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>
2019-09-05namespaceapi: AddSIDToBoundaryDescriptor modifies the handleJason A. Donenfeld
2019-09-01wintun: take mutex first alwaysJason A. Donenfeld
This prevents an ABA deadlock with setupapi's internal locks.
2019-09-01wintun: consider abandoned mutexes as releasedJason A. Donenfeld
2019-08-31ipc: windows: use protected prefixJason A. Donenfeld
2019-08-30winpipe: enforce ownership of client connectionJason A. Donenfeld
2019-08-30wintun: put mutex into private namespaceJason A. Donenfeld
2019-08-30namespaceapi: fix mistakeJason A. Donenfeld
2019-08-30namespaceapi: initial versionSimon Rozman
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-08-30wintun: take mutex so that deletion uses the right nameJason A. Donenfeld
2019-08-29wintun: move ring constants into moduleJason A. Donenfeld
2019-08-29wintun: delete all interfaces is not used anymoreJason A. Donenfeld
2019-08-29wintun: Wintun->InterfaceJason A. Donenfeld
2019-08-29wintun: keep reference to pool in wintun objectJason A. Donenfeld
2019-08-29wintun: introduce adapter poolsSimon Rozman
This makes wintun package reusable for non-WireGuard applications. Signed-off-by: Simon Rozman <simon@rozman.si>
2019-08-28wintun: simplify rename logicJason A. Donenfeld
2019-08-28wintun: give better errors when ndis interface listing failsJason A. Donenfeld
2019-08-28wintun: also check for numbered suffix and friendly nameJason A. Donenfeld
2019-08-28wintun: upgrade deleting all interfaces and make it reusableSimon Rozman
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>
2019-08-27wintun: cleanup earlierJason A. Donenfeld
2019-08-27wintun: rename duplicate adapters instead of ourselvesJason A. Donenfeld
2019-08-26wintun: match suffix numbersJason A. Donenfeld
2019-08-25device: getsockname on linux to determine portJason A. Donenfeld
It turns out Go isn't passing the pointer properly so we wound up with a zero port every time.
2019-08-24wintun: make description consistent across fieldsJason A. Donenfeld
2019-08-22wintun: try multiple names until one isn't a duplicateJason A. Donenfeld
2019-08-21wintun: use nci.dll directly instead of buggy netshellJason A. Donenfeld
2019-08-20wintun: set friendly a bit betterJason A. Donenfeld
This is still wrong, but NETSETUPPKEY_Driver_FriendlyName seems a bit tricky to use.
2019-08-19wintun: also set friendly name after setting interface nameJason A. Donenfeld
2019-08-19wintun: defer requires unique variableJason A. Donenfeld
2019-08-19wintun: set adapter description nameJason A. Donenfeld
2019-08-19tun: windows: don't spin unless we really need itJason A. Donenfeld
2019-08-05version: bump snapshot0.0.20190805Jason A. Donenfeld
2019-08-05device: drop lock before expiring keysJason A. Donenfeld
2019-08-05uapi: skip peers with invalid keysJason A. Donenfeld
2019-08-03tun: windows: spin for only a millisecond/80Jason A. Donenfeld
Performance stays the same as before.