HomeFreeBSD

blacklistd: Don't remove a ruleset if we have already added it

Description

blacklistd: Don't remove a ruleset if we have already added it

The noted argument is wrong - if it's already been deleted then the id we
have for it is invalid.
Because we don't track deletions to the ruleset, working it out is
problematic at best.

Instead, if we have already added the rule treat it as a non-op.

This is a valid use case because we might receive a burst of messages
in the downstream application for the same address and process them
one by one. It's not the job of the downstream application to track
blacklistd state.

Obtained from: https://github.com/zoulasc/blocklist/commit/959b18a6047c6facd100e5bb8a759eb597c65df2

Details

Provenance
jlduran_gmail.comAuthored on Oct 12 2022, 4:42 PM
emasteCommitted on Oct 12 2022, 7:47 PM
Parents
rGb290769b9811: blacklistd: silence sign-conversion warning from Clang
Branches
Unknown
Tags
Unknown