1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-20 08:27:15 +00:00

Fix sshguared-ipfw -b option

PR:		157807
Submitted by:	Dmitry <smallcms@gmail.com>
Approved by:	maintainer timeout
This commit is contained in:
Tilman Keskinoz 2011-07-24 18:16:30 +00:00
parent 5a264221fa
commit 0c7c6a06e8
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=278252
2 changed files with 22 additions and 0 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= sshguard
PORTVERSION= 1.5
PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= SF/sshguard/sshguard/sshguard-${PORTVERSION}

View File

@ -0,0 +1,21 @@
--- src/sshguard.c.orig 2010-08-09 08:44:15.000000000 +0200
+++ src/sshguard.c 2011-03-28 11:42:42.000000000 +0200
@@ -566,9 +566,13 @@
/* terminate array list */
addresses[i] = NULL;
/* do block addresses of this kind */
- if (fw_block_list(addresses, addrkind, service_codes) != FWALL_OK) {
- sshguard_log(LOG_CRIT, "While blocking blacklisted addresses, the firewall refused to block!");
- }
+ if (addresses[0] == NULL) {
+ sshguard_log(LOG_DEBUG, "No %s addresses in loaded blacklist.", (addrkind == ADDRKIND_IPv4) ? "IPv4" : "IPv6");
+ } else {
+ if (fw_block_list(addresses, addrkind, service_codes) != FWALL_OK) {
+ sshguard_log(LOG_CRIT, "While blocking blacklisted addresses, the firewall refused to block!");
+ }
+ }
}
/* free temporary arrays */
free(addresses);