fix: engine exit when too many packets hit NFQUEUE

This is a more graceful way to disable ENOBUFS reporting than
bed34f94be
This commit is contained in:
Haruue 2024-02-28 21:20:08 +08:00
parent bc8d15ef37
commit 1852a2594d
No known key found for this signature in database
GPG Key ID: F6083B28CBCBC148

View File

@ -127,6 +127,10 @@ func NewNFQueuePacketIO(config NFQueuePacketIOConfig) (PacketIO, error) {
if err != nil {
return nil, err
}
err = n.Con.SetOption(netlink.NoENOBUFS, true)
if err != nil {
return nil, fmt.Errorf("failed to set NoENOBUFS option: %w", err)
}
return &nfqueuePacketIO{
n: n,
local: config.Local,