php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #49341 add SO_REUSEPORT support for socket_set_option()
Submitted: 2009-08-24 00:26 UTC Modified: 2010-12-20 13:22 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: jolan at gormsby dot com Assigned:
Status: Open Package: Sockets related
PHP Version: 5.2.10 OS: OpenBSD 4.6-current
Private report: No CVE-ID:
Have you experienced this issue?
Rate the importance of this bug to you:

 [2009-08-24 00:26 UTC] jolan at gormsby dot com
Description:
------------
SO_REUSEPORT is needed to allow separate processes to bind to the same 
port. Add the following to ext/sockets/sockets.c after SO_REUSEADDR:

#ifdef SO_REUSEPORT
       REGISTER_LONG_CONSTANT("SO_REUSEPORT",  SO_REUSEPORT,   CONST_CS 
| CONST_PERSISTENT);
#endif

I believe SO_REUSEPORT is not available under Windows, hence the ifdef.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-09-09 06:11 UTC] netnghia at yahoo dot com
After I add define SO_REUSEPORT to ext/sockets/sockets.c
I configure, make, make install php-5.2.9 again,  I have error:

Warning: socket_set_option(): unable to set socket option [92]: Protocol not available in /usr/share/gds_ftps/gds_ftpd.php on line 985

I don't know what to do to fix. It seem SO_REUSEPORT still cannot use.

Any suggestion?
 [2009-09-09 20:26 UTC] jolan at gormsby dot com
I believe SO_REUSEPORT is *BSD only.  What OS are you using?
 [2010-12-20 13:22 UTC] jani@php.net
-Package: Feature/Change Request +Package: Sockets related
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Sat Apr 19 09:02:28 2014 UTC