mirror of
https://github.com/apernet/OpenGFW.git
synced 2024-12-22 17:09:21 +08:00
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:
parent
bc8d15ef37
commit
1852a2594d
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user