NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/57767: blacklistd data inconsistency
>Number: 57767
>Category: bin
>Synopsis: blacklistd data inconsistency
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Dec 11 05:40:00 +0000 2023
>Originator: Yoshitaka Tokugawa
>Release: NetBSD 9.3
>Organization:
>Environment:
NetBSD hpms.tokugawa.org 9.3 NetBSD 9.3 (NETBSD) #4: Fri Dec 8 15:45:00 JST 2023 toku%hpms.tokugawa.org@localhost:/usr/src/sys/arch/amd64/compile/NETBSD amd64
>Description:
When blacklistd is restarted with the -r option, the blacklistd ruleset for npf is updated based on information in the database file. At this time, the new id assigned by npfctl is retained in blacklistd's memory, but the database file is not updated, resulting in inconsistencies with the information displayed by blacklistctl dump command. To resolve this problem, I propose the following modifications.
>How-To-Repeat:
1. restart blacklistd with -r
2. compare id number by following commands
npfctl rule blacklistd list
blacklistctl dump -b
This problem occurs when blacklistd is restarted after some old rules have been deleted by blacklistd.
>Fix:
*** blacklistd.c.orig Mon Dec 11 11:57:04 2023
--- blacklistd.c Mon Dec 11 11:53:25 2023
***************
*** 396,402 ****
--- 396,404 ----
continue;
(void)run_change("add", &c, dbi.id, sizeof(dbi.id));
+ state_put(state, &c, &dbi); /* toku */
}
+ state_sync(state); /* toku */
}
int
Home |
Main Index |
Thread Index |
Old Index