Bug #80067 [Csd]: Omitting the port in bindto setting results in "Failed to parse address" error

From: Date: Sat, 12 Sep 2020 11:35:18 +0000
Subject: Bug #80067 [Csd]: Omitting the port in bindto setting results in "Failed to parse address" error
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-228986@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80067&edit=1 ID: 80067 User updated by: me at derrabus dot de Reported by: me at derrabus dot de Summary: Omitting the port in bindto setting results in "Failed to parse address" error Status: Closed Type: Bug Package: Sockets related Operating System: macOS 10.15 PHP Version: 7.4.10 Assigned To: cmb Block user comment: N Private report: N New Comment: I cannot reproduce the issue on master anymore. Thank you for the quick fix! Previous Comments: ------------------------------------------------------------------------ [2020-09-11 13:03:08] cmb@php.net Automatic comment on behalf of cmbecker69@gmx.de Revision: http://git.php.net/?p=php-src.git;a=commit;h=dfb3a799140d7d526c0ab77be437b663bfac9cc4 Log: Fix #80067: Omitting the port in bindto setting errors ------------------------------------------------------------------------ [2020-09-09 12:32:42] cmb@php.net The following pull request has been associated: Patch Name: Fix #80067: Omitting the port in bindto setting errors On GitHub: https://github.com/php/php-src/pull/6104 Patch: https://github.com/php/php-src/pull/6104.patch ------------------------------------------------------------------------ [2020-09-07 11:48:29] me at derrabus dot de > Except that has a different meaning. Exactly, but the issue is the same. My fear was that we're focusing too much on that obscure zero, so I wanted to demonstrate that the zero isn't really the issue here. ------------------------------------------------------------------------ [2020-09-07 08:58:22] requinix@php.net > If that zero is too obscure, we can do the same with an actual IP address > assigned to the machine you're running the code on, Except that has a different meaning. I don't think there are too many good cases for binding to all interfaces either, but PHP shouldn't disallow it just because it could be misused. ------------------------------------------------------------------------ [2020-09-07 08:40:40] me at derrabus dot de > But I don’t think it is a good practice to use "0" Probably. If that zero is too obscure, we can do the same with an actual IP address assigned to the machine you're running the code on, like 192.168.0.1 for example. * Setting bindto to "192.168.0.1:0" will work on 7.4.9 and 7.4.10. * Setting bindto to "192.168.0.1" will work on 7.4.9 and break on 7.4.10. So, omitting the port is what isn't possible anymore. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=80067 -- Edit this bug report at https://bugs.php.net/bug.php?id=80067&edit=1

« previous php.bugs (#228986) next »