From e75ccb2469111f5f803633d8e637cbe4fa26afef Mon Sep 17 00:00:00 2001 From: Alexander Logvinov Date: Sat, 3 Oct 2009 04:39:07 +0000 Subject: - Fix ipfw issues - Bump PORTREVISION PR: ports/139306 Submitted by: Olli Hauer (maintainer) Approved by: tabthorpe, glarkin (mentors, implicit) --- mail/spamd/Makefile | 2 +- mail/spamd/files/patch-spamd__grey.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 mail/spamd/files/patch-spamd__grey.c 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); ++ } + } + } + -- cgit v1.2.3