-
Couldn't load subscription status.
- Fork 1.3k
device: return generic error from Ipc{Get,Set}Operation. #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
All atomic access must be aligned to 64 bits, even on 32-bit platforms. Go promises that the start of allocated structs is aligned to 64 bits. So, place the atomically-accessed things first in the struct so that they benefit from that alignment. As a side bonus, it cleanly separates fields that are accessed by atomic ops, and those that should be accessed under mu. Also adds a test that will fail consistently on 32-bit platforms if the struct ever changes again to violate the rules. This is likely not needed because unaligned access crashes reliably, but this will reliably fail even if tests accidentally pass due to lucky alignment. Signed-Off-By: David Anderson <[email protected]>
Signed-off-by: Avery Pennarun <[email protected]>
The sticky socket code stays in the device package for now, as it reaches deeply into the peer list. This is the first step in an effort to split some code out of the very busy device package. Signed-off-by: David Crawshaw <[email protected]>
Signed-off-by: Brad Fitzpatrick <[email protected]>
Signed-off-by: Brad Fitzpatrick <[email protected]>
Based on types and config parser from wireguard-windows. Signed-off-by: David Crawshaw <[email protected]>
Signed-off-by: Tyler Kropp <[email protected]>
Signed-off-by: Brad Fitzpatrick <[email protected]>
Signed-off-by: Brad Fitzpatrick <[email protected]>
Signed-off-by: David Crawshaw <[email protected]>
This code is useful to other packages writing tests. Signed-off-by: David Crawshaw <[email protected]>
This makes uapi.go's public API conform to Go style in terms of error types. Signed-off-by: David Anderson <[email protected]>
65f1869 to
11705e6
Compare
|
LGTM |
|
Merged upstream. I can't close your PRs. |
|
This might have implications for wireguard-android, wireguard-windows, and wireguard-apple: https://github.com/WireGuard/wireguard-windows/blob/master/tunnel/service.go#L199-L204 https://github.com/WireGuard/wireguard-apple/blob/master/wireguard-go-bridge/api-ios.go#L107-L111 |
8a3c04a to
28c4d04
Compare
1ae3898 to
4e9e5da
Compare
eba36c5 to
ffb742d
Compare
89a9432 to
b9669b7
Compare
5ba9663 to
c92064f
Compare
This makes uapi.go's public API conform to Go style in terms
of error types.
Signed-off-by: David Anderson [email protected]