rpms/milter-greylist/devel ai_addrconfig.patch, NONE, 1.1 milter-greylist.spec, 1.26, 1.27

Enrico Scholz ensc at fedoraproject.org
Sat Feb 14 18:29:13 UTC 2009


Author: ensc

Update of /cvs/extras/rpms/milter-greylist/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv1358

Modified Files:
	milter-greylist.spec 
Added Files:
	ai_addrconfig.patch 
Log Message:
updated


ai_addrconfig.patch:

--- NEW FILE ai_addrconfig.patch ---
ISC libbind provides AI_ADDRCONFIG macro, but getaddrinfo() fails with
EAI_BADFLAGS when invoked with it.

Index: milter-greylist-4.2b1/spamd.c
===================================================================
--- milter-greylist-4.2b1.orig/spamd.c
+++ milter-greylist-4.2b1/spamd.c
@@ -454,11 +454,21 @@ spamd_inet_socket(host, port)
 
 	bzero(&hints, sizeof(hints));
 	hints.ai_socktype = SOCK_STREAM;
+
 #ifdef AI_ADDRCONFIG
 	hints.ai_flags = AI_ADDRCONFIG;
+
+again:
+	e = getaddrinfo(host, port, &hints, &ai);
+	if (e == EAI_BADFLAGS && (hints.ai_flags & AI_ADDRCONFIG)) {
+		hints.ai_flags &= ~AI_ADDRCONFIG;
+		goto again;
+	}
+#else
+	e = getaddrinfo(host, port, &hints, &ai);
 #endif
 
-	if ((e = getaddrinfo(host, port, &hints, &ai))) {
+	if (e) {
 		mg_log(LOG_ERR, 
 		       "spamd getaddrinfo failed: %s", 
 		       gai_strerror(e));


Index: milter-greylist.spec
===================================================================
RCS file: /cvs/extras/rpms/milter-greylist/devel/milter-greylist.spec,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- milter-greylist.spec	14 Feb 2009 12:22:52 -0000	1.26
+++ milter-greylist.spec	14 Feb 2009 18:28:43 -0000	1.27
@@ -19,7 +19,7 @@
 Summary:	Milter for greylisting, the next step in the spam control war
 Name:		milter-greylist
 Version:	4.2
-Release:	%release_func 0.1.%{?beta}
+Release:	%release_func 0.2.%{?beta}
 License:	BSD with advertising
 Group:		System Environment/Daemons
 URL:		http://hcpnet.free.fr/milter-greylist/
@@ -29,6 +29,7 @@
 Patch1:		overflow.patch
 Patch2:		size_t.patch
 Patch3:		p0f-silent.patch
+Patch4:		ai_addrconfig.patch
 BuildRoot:	%_tmppath/%name-%version-%release-root
 Requires:		init(%name)
 Provides:		user(%username)  = 7
@@ -78,6 +79,7 @@
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 
 install -p -m0644 %SOURCE1 .
 




More information about the fedora-extras-commits mailing list