Skip to content

Commit ddd1dd0

Browse files
committed
ext/sockets: adding BSD IP_BINDANY constant.
Simply allows the socket to bind to any address, including one not bound to any network interface. close GH-17591
1 parent e499927 commit ddd1dd0

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ PHP NEWS
132132
(David Carlier)
133133
. socket_getsockname/socket_create/socket_bind handled AF_PACKET family socket.
134134
(David Carlier)
135+
. Added IP_BINDANY for a socket to bind to any address. (David Carlier)
135136

136137
- Sodium:
137138
. Fix overall theorical overflows on zend_string buffer allocations.

UPGRADING

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ PHP 8.5 UPGRADE NOTES
267267
. TCP_REUSPORT_LB_NUMA_CURDOM (FreeBSD only).
268268
. TCP_BBR_ALGORITHM (FreeBSD only).
269269
. AF_PACKET (Linux only).
270+
. IP_BINDANY (FreeBSD/NetBSD/OpenBSD only).
270271

271272
========================================
272273
11. Changes to INI File Handling

ext/sockets/sockets.stub.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1915,6 +1915,13 @@
19151915
*/
19161916
const TCP_REPAIR = UNKNOWN;
19171917
#endif
1918+
#if defined(IP_BINDANY)
1919+
/**
1920+
* @var int
1921+
* @cvalue IP_BINDANY
1922+
*/
1923+
const IP_BINDANY = UNKNOWN;
1924+
#endif
19181925
#if defined(IP_DONTFRAG)
19191926
/**
19201927
* @var int

ext/sockets/sockets_arginfo.h

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)