Yahoo Groups archive

Milter-greylist

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

Message

Re: [milter-greylist] MX sync bind failed - Address in use

2004-06-18 by brian Snead

I am having trouble applying this patch to my sync.c file. I didn't have 
any trouble with the previous diff file you sent. Is there a different 
way this one needs to be applied? I could manually apply the changes, 
but I figured I should learn something new about Diffs.

Thanks for you patience.

Brian

manu@... wrote:

>Cyril Guibourg <cg+milter-greylist@...> wrote:
>
>  
>
>>I believe the bug is in sync.c where the service number returned by
>>getservbyname() is assigned using htons() which reverts the byte order.
>>    
>>
>
>Yes, you are right. From the man page:
>s_port     The port number at which the service resides.  Port numbers
>           must be given and are returned in network byte order.
>
>I did not noticed that bug since both my MX are big endian machines.
>
>Here is a patch that should fix it:
>
>Index: sync.c
>===================================================================
>RCS file: /cvsroot/milter-greylist/sync.c,v
>retrieving revision 1.45
>diff -r1.45 sync.c
>299c299
><               service = MXGLSYNC_PORT;
>---
>  
>
>>              service = htons(MXGLSYNC_PORT);
>>    
>>
>324c324
><       raddr.sin_port = htons(service);
>---
>  
>
>>      raddr.sin_port = service;
>>    
>>
>442c442
><               service = MXGLSYNC_PORT;
>---
>  
>
>>              service = htons(MXGLSYNC_PORT);
>>    
>>
>465c465
><       laddr.sin_port = htons(service);
>---
>  
>
>>      laddr.sin_port = service;
>>    
>>
>
>  
>

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.