mirror of
https://github.com/apernet/OpenGFW.git
synced 2024-12-23 01:19: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 {
|
if err != nil {
|
||||||
return nil, err
|
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{
|
return &nfqueuePacketIO{
|
||||||
n: n,
|
n: n,
|
||||||
local: config.Local,
|
local: config.Local,
|
||||||
|
Loading…
Reference in New Issue
Block a user