defguard icon indicating copy to clipboard operation
defguard copied to clipboard

Netlink error after upgrade to 0.10.0

Open TokuiNico opened this issue 1 year ago • 3 comments

Hi, I upgrade defguard core (0.10.0) and gateway (0.6.2) to latest version.

I got the error message in gateway service

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

and got another error message in core service

Apr 12 01:23:34 ***** docker[12769]: 2024-04-11T17:23:34.232267Z  INFO defguard::grpc::gateway: Starting update stream to gateway: *******, network [ID 1] ****
Apr 12 01:23:34 ***** docker[12769]: 2024-04-11T17:23:34.243566Z  INFO defguard::grpc::gateway: Client disconnected
Apr 12 01:23:34 ***** docker[12769]: 2024-04-11T17:23:34.243624Z  INFO defguard::grpc: Disconnecting gateway ******* in network 1
Apr 12 01:23:34 ***** docker[12769]: 2024-04-11T17:23:34.244441Z  INFO defguard::grpc::gateway: Sending configuration to gateway client, network [ID 1] ****.
Apr 12 01:23:34 ***** docker[12769]: 2024-04-11T17:23:34.244483Z  INFO defguard::grpc: Adding gateway ******* with to gateway map for network 1

I try to downgrade to old version but meet migration error.

TokuiNico avatar Apr 11 '24 17:04 TokuiNico

It seems that the defguard-gateway service failed to load the config after restarting due to too many devices. The error message indicates that a serialized netlink packet of 13724 bytes is larger than the maximum size of 12288 bytes.

I successfully started the service by removing some devices so that the config file was smaller than the maximum size. However, I also need to reconfigure the removed devices...

TokuiNico avatar Apr 12 '24 02:04 TokuiNico

I think the problem could be hear Have any reason to set the max buffer length as 12288 ? I didn't see any constraint like this in the Golang implemention.

Noahnut avatar Apr 23 '24 08:04 Noahnut

Fixed in PR #64

moubctez avatar Jul 05 '24 10:07 moubctez