From d3790a5ced2bb6e32b3b677338eeb0fc7ba8e641 Mon Sep 17 00:00:00 2001 From: Marcus Alves Grando Date: Fri, 4 Dec 2009 14:00:51 +0000 Subject: [PATCH] - Fix a bug which cause signal 6 in milter-greylist. - Fix other bug on IP6. - Bump PORTREVISION. Submitted by: ume --- mail/libspf2/Makefile | 1 + .../files/patch-src_libspf2_spf__compile.c | 11 +++++++ .../files/patch-src_libspf2_spf__expand.c | 13 +++++++++ .../files/patch-src_libspf2_spf__interpret.c | 29 +++++++++++++++++++ 4 files changed, 54 insertions(+) create mode 100644 mail/libspf2/files/patch-src_libspf2_spf__compile.c create mode 100644 mail/libspf2/files/patch-src_libspf2_spf__expand.c create mode 100644 mail/libspf2/files/patch-src_libspf2_spf__interpret.c diff --git a/mail/libspf2/Makefile b/mail/libspf2/Makefile index d56254600624..0f16f13ccb0d 100644 --- a/mail/libspf2/Makefile +++ b/mail/libspf2/Makefile @@ -7,6 +7,7 @@ PORTNAME= libspf2 PORTVERSION= 1.2.9 +PORTREVISION= 1 CATEGORIES= mail MASTER_SITES= http://www.libspf2.org/%SUBDIR%/ MASTER_SITE_SUBDIR= spf diff --git a/mail/libspf2/files/patch-src_libspf2_spf__compile.c b/mail/libspf2/files/patch-src_libspf2_spf__compile.c new file mode 100644 index 000000000000..dd5b6384336c --- /dev/null +++ b/mail/libspf2/files/patch-src_libspf2_spf__compile.c @@ -0,0 +1,11 @@ +--- src/libspf2/spf_compile.c 2008-11-03 15:37:33.000000000 -0500 ++++ src/libspf2/spf_compile.c 2009-09-07 23:46:02.000000000 -0400 +@@ -778,7 +778,7 @@ + const char *end; + const char *p; + +- char buf[ INET_ADDRSTRLEN ]; ++ char buf[ INET6_ADDRSTRLEN ]; + size_t len; + int err; + diff --git a/mail/libspf2/files/patch-src_libspf2_spf__expand.c b/mail/libspf2/files/patch-src_libspf2_spf__expand.c new file mode 100644 index 000000000000..1f78ba131766 --- /dev/null +++ b/mail/libspf2/files/patch-src_libspf2_spf__expand.c @@ -0,0 +1,13 @@ +Index: src/libspf2/spf_expand.c +diff -u -p src/libspf2/spf_expand.c.orig src/libspf2/spf_expand.c +--- src/libspf2/spf_expand.c.orig 2008-11-04 06:29:00.000000000 +0900 ++++ src/libspf2/spf_expand.c 2009-11-02 01:50:13.008764120 +0900 +@@ -245,7 +245,7 @@ top: + case PARM_CLIENT_IP: /* SMTP client IP */ + #ifdef COMPUTE + if (compute_length) { +- len = sizeof(ip6_buf); ++ len = sizeof(ip6_rbuf); + if (d->dv.url_encode) + len *= 3; + buflen += len; diff --git a/mail/libspf2/files/patch-src_libspf2_spf__interpret.c b/mail/libspf2/files/patch-src_libspf2_spf__interpret.c new file mode 100644 index 000000000000..2dbc39b54362 --- /dev/null +++ b/mail/libspf2/files/patch-src_libspf2_spf__interpret.c @@ -0,0 +1,29 @@ +--- src/libspf2/spf_interpret.c 2008-10-22 11:47:43.000000000 -0400 ++++ src/libspf2/spf_interpret.c 2009-09-08 00:42:25.000000000 -0400 +@@ -505,7 +505,7 @@ + char dst_ip6_buf[ INET6_ADDRSTRLEN ]; + + struct in6_addr src_ipv6; +- int cidr, mask; ++ int cidr, cidr_save, mask; + int i; + int match; + +@@ -517,6 +517,7 @@ + cidr = SPF_i_mech_cidr(spf_request, mech); + if ( cidr == 0 ) + cidr = 128; ++ cidr_save = cidr; + + match = TRUE; + for( i = 0; i < array_elem( ipv6.s6_addr ) && match; i++ ) +@@ -538,7 +539,7 @@ + INET_NTOP(AF_INET6, &ipv6.s6_addr, + dst_ip6_buf, sizeof(dst_ip6_buf)); + SPF_debugf( "ip_match: %s == %s (/%d): %d", +- src_ip6_buf, dst_ip6_buf, cidr, match ); ++ src_ip6_buf, dst_ip6_buf, cidr_save, match ); + } + + return match; +