madhuneal / lusca-cache

Automatically exported from code.google.com/p/lusca-cache
0 stars 0 forks source link

Unnecessary bind? #142

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
in libiapp/comm.c there is function comm_fdopen6()

in corresponding lines we are checking for custom outgoing address as i 
understand

    } else if (! sqinet_is_noaddr(&F->local_address)) {                                                                                                                                                   
        if (commBind(new_socket, &F->local_address) != COMM_OK) {                                                                                                                                         
            comm_close(new_socket);                                                                                                                                                                       
            return -1;                                                                                                                                                                                    
        }                                  

But in fact local_address, if no ACL is matched - set to INADDR_ANY, in 
getOutgoingAddr -> aclMapAddr() !
As result unnecessary bind is done and it is causing issues on very heavy load 
servers under Linux (no idea why).

Proposed fix attached. Probably it should be more proper fix, especially for 
ipv6.

Original issue reported on code.google.com by nuclear...@gmail.com on 6 Apr 2011 at 3:03

Attachments:

GoogleCodeExporter commented 8 years ago
Patch is invalid, it will break http_port listening to 0.0.0.0, i will make 
more careful patch

Original comment by nuclear...@gmail.com on 10 Apr 2011 at 8:55