End-application improvements for the tun library use#139
Open
iamtakingiteasy wants to merge 1 commit intoWireGuard:masterfrom
Open
End-application improvements for the tun library use#139iamtakingiteasy wants to merge 1 commit intoWireGuard:masterfrom
iamtakingiteasy wants to merge 1 commit intoWireGuard:masterfrom
Conversation
2d0f8e2 to
5afb1e0
Compare
Author
|
Cleanup: removed |
5afb1e0 to
e60fbd3
Compare
Author
|
Added ICMP checksum support, useful for handling ICMP fragmentation needed and other errors when doing NAT. Checksum of the embedded packet in ICMP body is not handled however and must be updated in separate call, if necessary. |
Add backwards-compatible functional options support to native tun interfaces. Add support for indicating carrier presence [linux only]. Add `SetCarrier(bool) error` to tun.Device interface for changing carrier state [linux only]. Add option to create tun device without carrier, or with carrier present [linux only]. Merge src/dst fields in checksum computation to use larger loop unrolls. Export checksum functions to applications, add ICMP checksumming. Add option to disable tun offloads [linux only]. Add option to enforce tun checksum computation for outgoing packets [all platforms]. Add `MinOffset() int` to tun.Device interface, informing library users of the required offset. Signed-off-by: Alexander Tumin <iamtakingiteasy@eientei.org>
e60fbd3 to
b4c5778
Compare
Author
|
Fixed IPv6 checksum/payload length calculation |
This file contains hidden or 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
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.
Adds some minor quality of life improvements for other applications relying on the widely ported tun implementation, namely:
CreateTUNshould be backwards compatible for current users.SetCarrier(bool) errorontun.Deviceand a functional option to provide initial state.MinOffset() intontun.Deviceto indicate required platform-specific offset in buffers to application.New methods in
tun.Devicemay be breaking to current third-party implementors of this interface, if there are any.