]> git.ipfire.org Git - thirdparty/wireguard-go.git/commit
device: remove QueueInboundElement.dropped
authorJosh Bleecher Snyder <josh@tailscale.com>
Sun, 17 Jan 2021 17:49:39 +0000 (09:49 -0800)
committerJason A. Donenfeld <Jason@zx2c4.com>
Wed, 20 Jan 2021 18:57:06 +0000 (19:57 +0100)
commita86492a5673983fe7755631996a23c2dc510808f
tree5444c653678b076799fa756a49a24d3521665e94
parent7ee95e053c280796ecfb5533000915e7daa13f69
device: remove QueueInboundElement.dropped

Now that we block when enqueueing to the decryption queue,
there is only one case in which we "drop" a inbound element,
when decryption fails.

We can use a simple, obvious, sync-free sentinel for that, elem.packet == nil.
Also, we can return the message buffer to the pool slightly later,
which further simplifies the code.

Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
device/receive.go