-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
device: return generic error from Ipc{Get,Set}Operation. #17
Open
danderson
wants to merge
12
commits into
WireGuard:master
Choose a base branch
from
danderson:danderson/uapi-err-type
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]>
bradfitz
reviewed
Apr 1, 2020
This makes uapi.go's public API conform to Go style in terms of error types. Signed-off-by: David Anderson <[email protected]>
danderson
force-pushed
the
danderson/uapi-err-type
branch
from
April 1, 2020 18:02
65f1869
to
11705e6
Compare
LGTM |
crawshaw
approved these changes
Apr 2, 2020
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 |
zx2c4-bot
force-pushed
the
master
branch
6 times, most recently
from
May 2, 2020 07:57
8a3c04a
to
28c4d04
Compare
zx2c4-bot
force-pushed
the
master
branch
4 times, most recently
from
March 9, 2021 04:32
6b5293b
to
6005c57
Compare
zx2c4-bot
force-pushed
the
master
branch
6 times, most recently
from
April 12, 2021 21:35
58beb0f
to
54dbe24
Compare
zx2c4-bot
force-pushed
the
master
branch
4 times, most recently
from
May 10, 2021 15:49
1ae3898
to
4e9e5da
Compare
zx2c4-bot
force-pushed
the
master
branch
4 times, most recently
from
November 16, 2021 20:16
eba36c5
to
ffb742d
Compare
zx2c4-bot
force-pushed
the
master
branch
5 times, most recently
from
February 2, 2022 22:09
89a9432
to
b9669b7
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This makes uapi.go's public API conform to Go style in terms
of error types.
Signed-off-by: David Anderson [email protected]