lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sat, 02 Apr 2011 20:10:48 +0200 From: Eric Dumazet <eric.dumazet@...il.com> To: Cyril Bonté <cyril.bonte@...e.fr> Cc: netdev@...r.kernel.org, Daniel Baluta <daniel.baluta@...il.com>, Gaspar Chilingarov <gasparch@...il.com>, Charles Duffy <charles@...is.net>, Willy Tarreau <w@....eu> Subject: Re: tcp: disallow bind() to reuse addr/port regression in 2.6.38 Le samedi 02 avril 2011 à 20:01 +0200, Cyril Bonté a écrit : > Hi All, > > (2nd try to fix the mailing list address) > > It has been reported that kernel 2.6.38 prevented the load balancer haproxy to > reload. After reading the kernel Changelog, it looks like the following commit > has a negative side effect on the the way haproxy "pauses" its listening > sockets to start a new process : > > http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c191a836a908d1dd6b40c503741f91b914de3348 > > Disabling the TCPF_CLOSE flag condition reallows to work as before. I guess > this was done for good reasons (Sorry, I haven't found the thread about that > commit in the archives yet) but other applications may also be impacted by > this change. > > I add Willy Tarreau to the CC to open the discussion. > > if (shutdown(listenfd, SHUT_WR) == 0 && > listen(listenfd, 1024) == 0 && > shutdown(listenfd, SHUT_RD) == 0) { > printf("shutdown OK\n"); > } > } > exit(0); > } > Wow, not clear what this is doing.... for sure the listen() call is not needed ? And the shutdown(listenfd, SHUT_WR) is clearly useless too. I feel you only needed the shutdown(listenfd, SHUT_RD) call. Why haproxy needs to setup a second listening socket on same port ? -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists