ext/sockets: add TCP_REPAIR to silently close a connection.

Closes GH-10724.
This commit is contained in:
David CARLIER 2023-02-27 21:38:41 +00:00 committed by David Carlier
parent c7637ed1c0
commit fbaa2eb059
4 changed files with 13 additions and 1 deletions

1
NEWS
View File

@ -117,6 +117,7 @@ PHP NEWS
. Added SOL_UPDLITE, UDPLITE_RECV_CSCOV and UDPLITE_SEND_CSCOV for updlite
protocol support. (David Carlier)
. Added SO_RERROR, SO_ZEROIZE and SO_SPLICE netbsd and openbsd constants.
. Added TCP_REPAIR for quietly close a connection.
- Standard:
. E_NOTICEs emitted by unserialize() have been promoted to E_WARNING. (timwolla)

View File

@ -170,6 +170,7 @@ PHP 8.3 UPGRADE NOTES
. SO_RERROR (NetBSD only).
. SO_ZEROIZE (OpenBSD only).
. SO_SPLICE (OpenBSD only).
. TCP_REPAIR (Linux only).
========================================
11. Changes to INI File Handling

View File

@ -1741,6 +1741,13 @@ const SO_DETACH_BPF = UNKNOWN;
*/
const TCP_QUICKACK = UNKNOWN;
#endif
#if defined(TCP_REPAIR)
/**
* @var int
* @cvalue TCP_REPAIR
*/
const TCP_REPAIR = UNKNOWN;
#endif
#if defined(IP_DONTFRAG)
/**
* @var int

View File

@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 2ee788183fb6f9925b3a7a8166076703319ba8c3 */
* Stub hash: e636fc791c75cffe089fdcba26d38c9dedb89b57 */
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)
@ -1006,6 +1006,9 @@ static void register_sockets_symbols(int module_number)
#if defined(TCP_QUICKACK)
REGISTER_LONG_CONSTANT("TCP_QUICKACK", TCP_QUICKACK, CONST_PERSISTENT);
#endif
#if defined(TCP_REPAIR)
REGISTER_LONG_CONSTANT("TCP_REPAIR", TCP_REPAIR, CONST_PERSISTENT);
#endif
#if defined(IP_DONTFRAG)
REGISTER_LONG_CONSTANT("IP_DONTFRAG", IP_DONTFRAG, CONST_PERSISTENT);
#endif