aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Logvinov <avl@FreeBSD.org>2009-10-03 04:39:07 +0000
committerAlexander Logvinov <avl@FreeBSD.org>2009-10-03 04:39:07 +0000
commite75ccb2469111f5f803633d8e637cbe4fa26afef (patch)
tree55888a9e0b3194a0850128dd72a7e1f4bfd0a80a
parent021bb9a90a12d0d16a5b76c2489dae123c407478 (diff)
Notes
-rw-r--r--mail/spamd/Makefile2
-rw-r--r--mail/spamd/files/patch-spamd__grey.c29
2 files changed, 30 insertions, 1 deletions
diff --git a/mail/spamd/Makefile b/mail/spamd/Makefile
index 7a8cf0f4117b..b0f233b6f110 100644
--- a/mail/spamd/Makefile
+++ b/mail/spamd/Makefile
@@ -7,7 +7,7 @@
PORTNAME= spamd
PORTVERSION= 4.5.0
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= mail
MASTER_SITES= BERLIOS
MASTER_SITE_SUBDIR=freebsdspamd
diff --git a/mail/spamd/files/patch-spamd__grey.c b/mail/spamd/files/patch-spamd__grey.c
new file mode 100644
index 000000000000..a98d2f5254ed
--- /dev/null
+++ b/mail/spamd/files/patch-spamd__grey.c
@@ -0,0 +1,29 @@
+--- ./spamd/grey.c.orig
++++ ./spamd/grey.c
+@@ -329,9 +329,10 @@
+ {
+ ipfw_table_entry ent;
+ int i;
+- static int ipfw_socket;
++ static int ipfw_socket = 0;
+
+- ipfw_socket = socket(AF_INET, SOCK_RAW, IPPROTO_RAW);
++ if (ipfw_socket == 0)
++ ipfw_socket = socket(AF_INET, SOCK_RAW, IPPROTO_RAW);
+
+ if (debug)
+ fprintf(stderr, "configure ipfw tabno: %d\n", ipfw_tabno);
+@@ -363,8 +364,11 @@
+ inet_aton(addrs[i], (struct in_addr *)&ent.addr);
+ if (setsockopt(ipfw_socket, IPPROTO_IP, IP_FW_TABLE_ADD, &ent, sizeof(ent)) < 0)
+ {
+- syslog_r(LOG_INFO, &sdata, "IPFW setsockopt(IP_FW_TABLE_ADD) (%m)");
+- return(-1);
++ /* work around dups */
++ if (errno != EEXIST) {
++ syslog_r(LOG_INFO, &sdata, "IPFW setsockopt(IP_FW_TABLE_ADD) (%m)");
++ return(-1);
++ }
+ }
+ }
+