| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
| |
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
| |
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use C23 typeof to eliminate redundant type parameters from the RCU
macros.
Also, drop mention of hoping to use alignas in TODO.md. It only goes on
members of structs, not the struct type itself, which I find
syntactically annoying, and it doesn't really confer any additional real
benefits.
Moving to C23 means that we must use __VA_OPT__.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
|
|
|
|
|
| |
The stub device only exists momentarily to create the software registry
key for SuggestedInstanceId. Setting SWDeviceCapabilitiesDriverRequired
with empty hardware IDs violates the SwDeviceCreate API contract and
causes PnP to needlessly search for a driver for this transient device.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
| |
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
| |
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
|
|
|
|
| |
If SnapshotConfigurationAndState fails, Configuration is left NULL, but
RestoreConfigurationAndState was called unconditionally, passing the
NULL pointer to DeviceIoControl.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
| |
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
|
|
|
| |
The return code before was wrong, because WaitForSingleObject returns
WAIT_OBJECT_0 on success, not TRUE.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
| |
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
|
|
|
|
| |
This eliminates the need for a cross signing certificate, which is no
longer needed in the kernel and was never useful in userspace. And it
does the timestamp server correctly.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
|
|
|
| |
api\configuration.c(45,39): error C2220: the following warning is treated as an error [api\api.vcxproj]
api\configuration.c(45,39): warning C5287: operands are different enum types 'WG_IOCTL_INTERFACE_FLAG' and 'WIREGUARD_INTERFACE_FLAG'; use an explicit cast to silence this warning [api\api.vcxproj]
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
|
|
| |
The other enums aren't using these.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
| |
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
| |
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
|
|
|
|
|
| |
This allows removing individual allowed IPs without having to clear them
all out and dropping packets or relying on a dummy peer to have move
semantics.
Suggested-by: Jordan Rife <jordan@jrife.io>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
|
|
|
|
| |
C++ doesn't have bitwise operators on enums by default. Rather than
reinventing the wheel, we use an undocumented DEFINE_ENUM_FLAG_OPERATORS
macro from Windows SDK to implement the enum operators.
Signed-off-by: Simon Rozman <simon@rozman.si>
|
| |
|
|
| |
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
| |
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
| |
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
| |
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
| |
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
| |
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
| |
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
| |
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
| |
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
| |
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Apparently breaking the guarantee of "Universal INF"s receives the big
tsk tsk, so this commit is yet another way to set SuggestedInstanceId.
We create an SwDevice, with DEVPKEY_Device_ClassGuid set to
GUID_DEVCLASS_NET and an empty HWID, and then create the software regkey
and add the keys we need. We then destroy the SwDevice, and recreate a
new one with the same instance ID, this time with the proper parameters.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
| |
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
| |
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
|
|
| |
This might allow us to more successfully move to using SwDevice.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
|
|
|
| |
Wait for the device to come up as enabled instead using the proper Win8+
API. Fall back to polling for Win7.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
|
|
|
| |
The strings are already unique, so prefixing function names adds
nothing.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
| |
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
| |
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
|
|
| |
It's unclear whether this registry key is still being respected.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
| |
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
| |
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
|
|
|
| |
This moves downlevelshim.lib and those .lib from any future DLLs in this
repo to the matching IntDir.
Signed-off-by: Simon Rozman <simon@rozman.si>
|
| |
|
|
|
|
| |
It turns out the precision is very useful for diagnosing weird errors.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
| |
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
|
|
| |
https://git.zx2c4.com/downlevel-driver-enabler/about/
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
| |
|
|
|
|
| |
These are no longer supported by the CAs.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|
|
|
Co-authored-by: Simon Rozman <simon@rozman.si>
Signed-off-by: Simon Rozman <simon@rozman.si>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
|