Allowing space for packet headers in Wintun Tx/Rx

David Woodhouse dwmw2 at infradead.org
Sat Apr 10 14:35:28 UTC 2021


On Sat, 2021-04-10 at 13:38 +0000, Simon Rozman wrote:
> Hi David,This is my proposal:
> https://git.zx2c4.com/wintun/commit/?id=eebd6aea4f75551f6e847a1d4fff857450bac6e9
> Awaiting review and zx2c4 approval. 😊
> Regards, Simon


Looks good to me; thanks. Just need to work out how to cross-build it
(I can muster up a Windows VM for testing, but *building* on it is
beyond my tolerance of Windows for now).

We'll also need to be able to WintunAllocateSendPacket() of the full
possible MTU, then receive and decrypt into that, and send only the
actual size of the packet we received.

A per-packet tail would have let us do that, but I agree that we don't
want to expand the TUN_PACKET header if we can avoid doing so.

Perhaps a WintunShrinkAndSendPacket() — which can only *shrink*, of
course, and which can only be used on the *last* packet allocated,
checking that its tail *is* the Session->Receive.Tail before adjusting
the latter accordingly.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5174 bytes
Desc: not available
URL: <http://lists.zx2c4.com/pipermail/wireguard/attachments/20210410/7fe39b3b/attachment.bin>


More information about the WireGuard mailing list