Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Message

Re: [milter-greylist] MX synchronization loss critical bug

2009-05-15 by Hajimu UMEMOTO

Hi,

>>>>> On Thu, 14 May 2009 11:52:39 +0200
>>>>> attila.bruncsak@... <attila.bruncsak@...> said:

attila> I have rearranged to code of sync_master_restart() to take into account
attila> that any of the sync_master thread can exit independently.
attila> It also reports better possible error conditions.
attila> The side effect of this is that on Tru64 UNIX the compilation
attila> environment
attila> supports IPV6 but the run-time not by default.
attila> Both the two sync_master threads are running, but I get a warning:

attila> milter-greylist: cannot set IPV6_V6ONLY: Invalid argument

attila> After that both the two sync_master thread tries to run on IPV4 socket.
attila> The second one fails on the bind, so the milter-greylist exit.

attila> To fix this error condition I had to add in addition
attila> too the SO_REUSEPORT code in the sync_listen() function.

It seems your code try to listen IPv4 1st then try to listen IPv6.  It
doesn't work correctly on some environment.  So, you need to try to
listen IPv6 before IPv4.  I think trying IPv6 before IPv4 should fix
your problem without issuing SO_REUSEPORT.

attila> The patch is attached.

You changed to test sync_master4.runs and sync_master6.runs
independly.  It seems to me that when either IPv6 thread or IPv4
thread fails, milter-greylist exit, now.  I suspect milter-greylist
became not work on at least IPv4 only host or the envionment where
IPv4-mapped IPv6 address is required to handle both IPv6 and IPv4.
This is why the following code was exist:

	if (!sync_master4.runs && !sync_master6.runs) {
		mg_log(LOG_ERR, "cannot start MX sync, socket failed: %s",
		    strerror(errno));
		exit(EX_OSERR);

Sincerely,

--
Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan
ume@...  ume@{,jp.}FreeBSD.org
http://www.imasy.org/~ume/

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.