google / nftables

This repository contains a Go module to interact with Linux nftables (the iptables successor).
Apache License 2.0
1.12k stars 140 forks source link

Update: process monitor events all at once upon commit #283

Closed Ignatella closed 3 weeks ago

Ignatella commented 1 month ago

Hi!

While using nftables, we discovered it would be more efficient to process monitor events (changes) all at once upon commit, triggered by the event that caused the change, such as NFT_MSG_NEWGEN.

This PR modifies the way events are handled by grouping all changes together and processing them in response to the event that initiated the change. Additionally, the event header, which includes important information such as the PID, is now propagated. This allows us to identify the process responsible for the change.

stapelberg commented 1 month ago

cc @singchia who contributed the monitoring code

Ignatella commented 3 weeks ago

Also added ProcComm check to TestMonitor