WireGuard / wgctrl-go

Package wgctrl enables control of WireGuard interfaces on multiple platforms.
https://godoc.org/golang.zx2c4.com/wireguard/wgctrl
MIT License
730 stars 85 forks source link

wireguardnl: implement message chunking on set calls #3

Closed mdlayher closed 5 years ago

mdlayher commented 6 years ago

Source: https://lists.zx2c4.com/pipermail/wireguard/2018-July/003148.html

Something to consider with this is the chunking. Since a device has
many peers and a peer has many allowedips, it's possible that these
might span multiple messages, larger than the maximum netlink packet
size. For that reason, wg(8) will properly split things into several
calls. Here's the set call:

https://git.zx2c4.com/WireGuard/tree/src/tools/ipc.c#n558
mdlayher commented 5 years ago

This is done now, but I've seen some weird behavior from the kernel module in some cases: https://lists.zx2c4.com/pipermail/wireguard/2018-August/003195.html.

mdlayher commented 5 years ago

This has been implemented and the upstream bug is fixed in master.