|
From: Kevin Z. <kev...@gm...> - 2017-01-20 02:10:02
|
On 01/18/17 15:27, Burton Strauss wrote:
> fw_flush is in finisher() which is called at the end of the program via atexit().
>
> IF it is called,
>
> static void finishup(void) {
> sshguard_log(LOG_INFO, "Exiting on %s",
> exit_sig == SIGHUP ? "SIGHUP" : "signal");
>
> if (fw_flush() != FWALL_OK) {
> sshguard_log(LOG_ERR, "fw: failed to flush blocked addresses");
> }
>
> So you would see the log message and then if the flush failed the 2nd
> message. I'm not seeing it. Next step would be to instrument the
> called code and log the call to the script and the chain at the end.
Here's my guess without looking at history and code:
If I remember correctly on 1.7.1 fw_flush() always returns FWALL_OK.
fw_flush() sends "flush" over a pipe to sshg-fw.
If the pipe gets broken first, then flush will never happen.
2.0 fixes this by issuing "flushonexit" to sshg-fw, so that whenever
sshg-fw exits flush is issued no matter if the pipe goes down first.
Fix is to upgrade to 2.0 or backport this.
Best,
Kevin
--
Kevin Zheng
kev...@gm... | ke...@be... | PGP: 0xC22E1090
|