aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/custom
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2013-06-04 14:51:42 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2013-06-04 14:51:42 +0100
commit89a411447ebc068efbe4c841c95adeaf9a1bbcd0 (patch)
tree4808e0e1e26ba10735718c2a6cc3711a5b4e8620 /src/plugins/custom
parentd0544d42a0cd4aa6f1b8d52c90c0e65b9d1c335b (diff)
downloadrspamd-89a411447ebc068efbe4c841c95adeaf9a1bbcd0.tar.gz
rspamd-89a411447ebc068efbe4c841c95adeaf9a1bbcd0.zip
Allow restriction of update commands for fuzzy storage.
Now it is possible to specify ip or networks from which fuzzy updates or removes are possible. Rework sockets logic while I'm here. Create universal utility for parsing ipv4/mask strings.
Diffstat (limited to 'src/plugins/custom')
-rw-r--r--src/plugins/custom/ipmark/ipmark.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/custom/ipmark/ipmark.c b/src/plugins/custom/ipmark/ipmark.c
index 5bdeca370..a40a94582 100644
--- a/src/plugins/custom/ipmark/ipmark.c
+++ b/src/plugins/custom/ipmark/ipmark.c
@@ -87,7 +87,7 @@ parse_ipmask (const char *begin, struct in_addr *ina, int *mask, int *value)
const char *pos;
char ip_buf[sizeof ("255.255.255.255")], mask_buf[3] = { '\0', '\0', '\0' }, *p;
int state = 1, dots = 0;
-
+
bzero (ip_buf, sizeof (ip_buf));
bzero (mask_buf, sizeof (mask_buf));
pos = begin;
@@ -164,8 +164,8 @@ parse_ipmask (const char *begin, struct in_addr *ina, int *mask, int *value)
*mask = 32;
}
- *mask = 0xFFFFFFFF << (32 - *mask);
-
+ *mask = 0xFFFFFFFF << (32 - *mask);
+
return TRUE;
}