https://gitlab.synchro.net/main/sbbs/-/commit/43f3b369a8804ccce7b3d320
Modified Files:
src/sbbs3/trash.c
Log Message:
trash.c: have filter_ip() return false when IP is already in the filter
filter_ip() returned true both when it newly added the IP to ip.can AND
when the IP was already present (the dedup-guarded early return). Since
commit be8ba77c2 ("Only log !BLOCKING IP ADDRESS when filter_ip() actually filters the IP") gated the "!BLOCKING IP ADDRESS" notices on the return
value, the already-present case kept emitting fresh BLOCKING notices on
every subsequent connection from a long-since-blocked IP. Observed in a
recent web server log: 6099 redundant "!BLOCKING IP ADDRESS" lines for a
single IP in one day.
Flip the already-present branch to return false. The dedup behavior is preserved (no duplicate append to ip.can), but the return now means
"this call added the IP", which is what every caller updated by
be8ba77c2 actually wanted.
Co-Authored-By: Claude Opus 4.7 (1M context) <
noreply@anthropic.com>
--- SBBSecho 3.37-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)