Bug #17074 Updated: Cannot bind() a socket to a specific port in FreeBSD
| From: | jason@php.net | Date: | Tue, 07 May 2002 19:14:48 +0000 |
| Subject: | Bug #17074 Updated: Cannot bind() a socket to a specific port in FreeBSD | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-7171@lists.php.net to get a copy of this message | ||
ID: 17074
Updated by: jason@php.net
Reported By: antonio.bonifati@polimi.it
-Status: Assigned
+Status: Open
Bug Type: Sockets related
Operating System: FreeBSD
PHP Version: 4.2.0
Assigned To: jason@php.net
New Comment:
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/
sizeof(sockaddr_in) is the appropriate fix
Previous Comments:
------------------------------------------------------------------------
[2002-05-07 12:58:41] jason@php.net
Thanks for the report antonio.
From an initial glance, the fix you suggest looks correct, however, I
still need to run it through a few tests.
Thanks,
-Jason
------------------------------------------------------------------------
[2002-05-07 10:48:23] antonio.bonifati@polimi.it
please see also bug #10830
this bug hasn't been fixed yet in php 4.2.0
could you fix it?
i fixed it for myself changing the line 1001
in ext/sockets/sockets.c:
retval = bind(php_sock->bsd_socket, (struct sockaddr *)sa,
sizeof(sa_storage));
with this one:
retval = bind(php_sock->bsd_socket, (struct sockaddr *)sa,
sizeof(struct sockaddr));
it seems that the last parameter to bind is broken
best regards
Antonio
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17074&edit=1