From 1852a2594d9e460803564c299d38ba14402666d5 Mon Sep 17 00:00:00 2001 From: Haruue Date: Wed, 28 Feb 2024 21:20:08 +0800 Subject: [PATCH] fix: engine exit when too many packets hit NFQUEUE This is a more graceful way to disable ENOBUFS reporting than bed34f94be612a8e59f51d4b6e1f019f4b0b038d --- io/nfqueue.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/io/nfqueue.go b/io/nfqueue.go index a4e5e2f..6b626a4 100644 --- a/io/nfqueue.go +++ b/io/nfqueue.go @@ -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,