DefGuard / wireguard-rs

Rust library providing unified WireGuard interface to native/kernel and userspace implementations
https://github.com/defguard/defguard/
Other
123 stars 10 forks source link

Netlink error when too many clients #59

Closed TokuiNico closed 12 hours ago

TokuiNico commented 1 month ago

Hi, I've been using the defguard service to manage our company's VPN device for several months and everything has been going well.

However, whenever I restart the defguard core service, the server crashes with the following error message:

Apr 12 01:04:03 ip-10-0-249-237 docker[22471]: [2024-04-11T17:04:03Z ERROR defguard_gateway::gateway] Interface configuration failed: WireGuard error Netlink error: Serialized netlink packet (13724 bytes) larger than maximum size 12288

It seems that the socket buffer length is not sufficient to accommodate such a large configuration. https://github.com/DefGuard/wireguard-rs/blob/4a0429aeca8b2f850cf010ddaa5a42f60db4f548/src/netlink.rs#L40 Is there a way to adjust this value?

moubctez commented 12 hours ago

Fixed in #64