1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

ext/sockets: addig Linux's IP_BIND_ADDRESS_NO_PORT.

Delay ephemeral port number attribution at connect time rather
than at bind's one.

Close GH-11119.
This commit is contained in:
David Carlier
2023-04-22 17:44:42 +01:00
parent a00e2233e3
commit 7b4b40f06f
4 changed files with 13 additions and 1 deletions

1
NEWS
View File

@@ -159,6 +159,7 @@ PHP NEWS
(David Carlier)
. Added TCP_REPAIR for quietly close a connection. (David Carlier)
. Added SO_REUSEPORT_LB freebsd constant. (David Carlier)
. Added IP_BIND_ADDRESS_NO_PORT. (David Carlier)
- Standard:
. E_NOTICEs emitted by unserialize() have been promoted to E_WARNING. (timwolla)

View File

@@ -235,6 +235,7 @@ PHP 8.3 UPGRADE NOTES
. SO_SPLICE (OpenBSD only).
. TCP_REPAIR (Linux only).
. SO_REUSEPORT_LB (FreeBSD only).
. IP_BIND_ADDRESS_NO_PORT (Linux only).
========================================
11. Changes to INI File Handling

View File

@@ -642,6 +642,13 @@ const IP_MULTICAST_TTL = UNKNOWN;
* @cvalue IP_MULTICAST_LOOP
*/
const IP_MULTICAST_LOOP = UNKNOWN;
#ifdef IP_BIND_ADDRESS_NO_PORT
/**
* @var int
* @cvalue IP_BIND_ADDRESS_NO_PORT
*/
const IP_BIND_ADDRESS_NO_PORT = UNKNOWN;
#endif
#if HAVE_IPV6
/**
* @var int

View File

@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: b8ca31ff65d450afac0d7e555311f57193b003c4 */
* Stub hash: a64427da8198261f528a38c5bf90c673eb5b8282 */
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_select, 0, 4, MAY_BE_LONG|MAY_BE_FALSE)
ZEND_ARG_TYPE_INFO(1, read, IS_ARRAY, 1)
@@ -576,6 +576,9 @@ static void register_sockets_symbols(int module_number)
REGISTER_LONG_CONSTANT("IP_MULTICAST_IF", IP_MULTICAST_IF, CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("IP_MULTICAST_TTL", IP_MULTICAST_TTL, CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("IP_MULTICAST_LOOP", IP_MULTICAST_LOOP, CONST_PERSISTENT);
#if defined(IP_BIND_ADDRESS_NO_PORT)
REGISTER_LONG_CONSTANT("IP_BIND_ADDRESS_NO_PORT", IP_BIND_ADDRESS_NO_PORT, CONST_PERSISTENT);
#endif
#if HAVE_IPV6
REGISTER_LONG_CONSTANT("IPV6_MULTICAST_IF", IPV6_MULTICAST_IF, CONST_PERSISTENT);
#endif