Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bpf: allow policy verdict notifications in bpf_host
300236c ("Add the datapath filtering for policy verdict logs.") introduced a mechanism to generate policy verdict logs only if an endpoint has a network policy enforced on the direction of the traffic, to reduce the number of allow events that otherwise would have been notified in case of default allow policies. Unfortunately this logic doesn't take into account the case where send_policy_verdict_notify is called from the bpf_host program (e.g. Host Firewall policies), as POLICY_VERDICT_LOG_FILTER is always set to 0 for that program, resulting in no policy verdicts being notified. This change tries to address this by ignoring the filter if send_policy_verdict_notify is evaluated in the context of bpf_host. Moreover, to prevent a flood of notifications, the ones for default allow policies are ignored. Signed-off-by: Gilberto Bertin <[email protected]>
- Loading branch information