Skip to content

Commit d713e36

Browse files
committed
ext/sockets: adding SO_BINDTOIFINDEX.
similar to SO_BINDTODEVICE but works with interface ids instead. close GH-15479
1 parent 80d7846 commit d713e36

File tree

4 files changed

+16
-1
lines changed

4 files changed

+16
-1
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ PHP NEWS
2424
- Hash:
2525
. Fix GH-15384 (Build fails on Alpine / Musl for amd64). (timwolla)
2626

27+
- Sockets:
28+
. Added SO_BINDTOIFINDEX to bind a socket to an interface index.
29+
(David Carlier)
30+
2731
- Standard:
2832
. php_uname() now throws ValueErrors on invalid inputs. (Girgias)
2933

UPGRADING

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -979,6 +979,7 @@ PHP 8.4 UPGRADE NOTES
979979
. IP_PORTRANGE_LOW (FreeBSD/NetBSD/OpenBSD only).
980980
. SOCK_NONBLOCK.
981981
. SOCK_CLOEXEC.
982+
. SOCK_BINDTOIFINDEX.
982983

983984
- Sodium:
984985
. SODIUM_CRYPTO_AEAD_AEGIS128L_KEYBYTES

ext/sockets/sockets.stub.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,13 @@
295295
*/
296296
const SO_BINDTODEVICE = UNKNOWN;
297297
#endif
298+
#ifdef SO_BINDTOIFINDEX
299+
/**
300+
* @var int
301+
* @cvalue SO_BINDTOIFINDEX
302+
*/
303+
const SO_BINDTOIFINDEX = UNKNOWN;
304+
#endif
298305
#ifdef SO_USER_COOKIE
299306
/**
300307
* @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)