diff --git a/ban2fail.c b/ban2fail.c index 0f6a671..6b73983 100644 --- a/ban2fail.c +++ b/ban2fail.c @@ -95,7 +95,7 @@ struct Global G= { .version= { .major= 0, .minor= 11, - .patch= 2 + .patch= 3 }, .bitTuples.flags= GlobalFlagBitTuples @@ -405,6 +405,10 @@ main(int argc, char **argv) /* List by address. Make a addr_map of LOGENTRY objects with composite counts */ MAP_visitAllEntries(&G.logType_map, (int(*)(void*,void*))LOGTYPE_map_addr, &S.addr2logEntry_map); + + /* Pick up remaining blocked addresses */ + IPTABLES_fill_in_missing(&S.addr2logEntry_map); + unsigned nItems= MAP_numItems(&S.addr2logEntry_map); LOGENTRY *leArr[nItems]; diff --git a/ban2fail.sh b/ban2fail.sh index 17e174e..7fc193a 100755 --- a/ban2fail.sh +++ b/ban2fail.sh @@ -7,6 +7,7 @@ BAN2FAIL=/usr/local/bin/ban2fail BAN2FAIL_CFG=/etc/ban2fail/ban2fail.cfg +INOTIFYWAIT=/usr/bin/inotifywait # Uncomment this if you wish to see output from the time command #TIME=time @@ -42,9 +43,8 @@ while true; do # If ban2fail failed, then pause to avoid DOS on CPU $TIME $BAN2FAIL || sleep 1 - done < <(exec /usr/bin/inotifywait -m $LOG_NAMES) + done < <(exec $INOTIFYWAIT -m $LOG_NAMES) - date | tr -d $'\n' echo ' Exiting main loop' sleep 1