1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 15:08:16 +02:00
Commit Graph

906 Commits

Author SHA1 Message Date
David Carlier 9c2572565a sockets adding TCP_QUICKACK constant.
having tigher control on ACK delays, difference is the setting
is `volatile` as it can be turned off by the kernel if not set
 explicitally set otherwise on the socket.

Closes GH-10145.
2022-12-22 14:50:33 +00:00
David CARLIER 4c4e72f149 socket add socket_atmark support.
checks whether the socket belongs to the out-of-band mark, thus allows to be
 processed accordingly (using the MSG_OOB flag on send/recv).

Closes #9846.
2022-10-31 16:38:18 +00:00
David Carlier 35b5aceff3 SO_ATTACH_REUSEPORT_CBPF filter update. SDK_AD_QUEUE support to attach to a queue.
Closes #9690
2022-10-15 11:22:26 +01:00
Arnaud Le Blanc 5b6f9df51a Merge branch 'PHP-8.2'
* PHP-8.2:
  [ci skip] NEWS
  [ci skip] NEWS
  [ci skip] NEWS
  Return immediately when FD_SETSIZE is exceeded (#9602)
2022-10-01 11:26:17 +02:00
Arnaud Le Blanc 246d13cd99 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [ci skip] NEWS
  [ci skip] NEWS
  Return immediately when FD_SETSIZE is exceeded (#9602)
2022-10-01 11:24:23 +02:00
Arnaud Le Blanc d4b99542d5 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  [ci skip] NEWS
  Return immediately when FD_SETSIZE is exceeded (#9602)
2022-10-01 11:23:34 +02:00
Arnaud Le Blanc 80232de0e4 Return immediately when FD_SETSIZE is exceeded (#9602) 2022-10-01 11:20:43 +02:00
Jakub Zelenka ac7d812fb7 Merge branch 'PHP-8.2' 2022-09-30 17:10:15 +01:00
Jakub Zelenka d2b7d67dac Merge branch 'PHP-8.1' into PHP-8.2 2022-09-30 17:08:55 +01:00
Jakub Zelenka ee8f2c75e0 Merge branch 'PHP-8.0' into PHP-8.1 2022-09-30 17:08:17 +01:00
Andy Postnikov c58241a003 Make socket path shorter for ext/sockets/tests/socket_cmsg_{rights|credentials}.phpt
When running in CI it fails when path/address is longer 108
2022-09-30 17:07:40 +01:00
David Carlier 615b8006c4 socket module add SO_ATTACH_REUSEPORT_CPBF for Linux.
to be used in conjunction with SO_REUSPORT, giving a greater control
over how we bind a socket instead of the round robin workflow, we do
 instead attach to the processor id as :
- we assign the processor_id to A in the BPF filter.
- then returns A.

in other words, a more modern version of SO_INCOMING_CPU (ie can have a per
 worker notion we do not use here).
Closes #8062
2022-09-29 23:32:39 +01:00
Christoph M. Becker 5fdf95b217 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix GH-9574: SOCKET_EPROTO constant missing since PHP 8.2 dev
2022-09-19 14:42:03 +02:00
Christoph M. Becker 4767b0999d Fix GH-9574: SOCKET_EPROTO constant missing since PHP 8.2 dev
Closes GH-9575.
2022-09-19 14:41:30 +02:00
Ilija Tovilo 743d3780c6 Add clang ASAN/UBSAN push job
Closes GH-9507
2022-09-14 23:55:46 +02:00
Christoph M. Becker b75542a8c8 Merge branch 'PHP-8.2'
* PHP-8.2:
  Fix: sockets constants
2022-09-14 15:27:55 +02:00
Bruce Dou 9f7e27a86b Fix: sockets constants
Closes GH-9533.
2022-09-14 15:27:29 +02:00
Bob Weinand a01dd9feda Revert "Port all internally used classes to use default_object_handlers"
This reverts commit 94ee4f9834.

The commit was a bit too late to be included in PHP 8.2 RC1. Given it's a massive ABI break, we decide to postpone the change to PHP 8.3.
2022-09-14 11:13:23 +02:00
David CARLIER 4f2759525c Fix GH-9493: fix ancillary data build for FreeBSD prior to the 13 release. (#9496)
the legacy sockcred struct does not hold the process id, thus sockcred2
 had been added from FreeBSD 13 in conjunction with LOCAL_CREDS_PERSISTENT
 to address this thus we disable the feature for earlier releases.
2022-09-08 09:10:16 +01:00
Máté Kocsis e733ebf30e Add parenthesis around preprocessor conditions in stubs
gen_stub.php concatenates nested #ifs into one #if so let's make sure the semantics remain the same.
2022-09-02 16:21:28 +02:00
Bob Weinand 94ee4f9834 Port all internally used classes to use default_object_handlers
Signed-off-by: Bob Weinand <bobwei9@hotmail.com>
2022-08-31 16:45:27 +02:00
Máté Kocsis b4ec3e9bc0 Do not generate CONST_CS when registering constants (#9439) 2022-08-28 08:27:19 +02:00
Máté Kocsis 98e5c4e3a3 Declare ext/sockets constants in stubs (#9349) 2022-08-16 13:18:31 +02:00
David Carlier 9090e2602e sockets ext for solaris update.
socket filter support, system can support up to 32 filters giving the possibility to retrive the full list.
Closes #8191.
2022-07-25 19:28:25 +01:00
David Carlier 067a3022f8 Sockets disable zerocopy test on ppc based arch.
Failure reported by alpine maintainers.
Closes #9081.
2022-07-21 13:36:49 +01:00
David Carlier dedad408fe sockets introduces socket_set_option SO_ZEROCOPY and MSG_ZEROCOPY for the socket_send* functions. it avoids copy b/w userland and kernel for both TCP and UDP protocols. 2022-07-10 20:06:52 +01:00
David Carlier a193427333 Adds TCP_CONGESTION socket option for Linux/FreeBSD.
Closes #8824.
2022-06-30 19:43:09 +01:00
David CARLIER 6b02cabc8a Add SO_SETFIB FreeBSD socket option constant.
Aims to set the route table.
Closes #8742.
2022-06-11 13:03:21 +01:00
Pierrick Charron 0e062c8af8 Merge branch 'PHP-8.1' 2022-06-09 13:51:50 -04:00
Pierrick Charron f97a650944 Merge branch 'PHP-8.0' into PHP-8.1 2022-06-09 13:49:45 -04:00
Pierrick Charron e2d55f2f12 Fix LONG_CHECK_VALID_INT in socket extension 2022-06-09 13:48:02 -04:00
David Carlier d677cc13ce Add SO_BPF_EXTENSIONS flag to socket.
Returns the supported bpf extensions from the kernel. Linux only.
Closes GH-8713.
2022-06-08 05:14:57 +01:00
David Carlier 6fe7ff95d9 Implements ancillary data on NetBSD.
With the couple LOCAL_CREDS/SCM_CREDS, in this system we get all the
infos needed (included the process id).
Closes GH-8700.
2022-06-06 23:06:01 +01:00
David CARLIER f813520b50 Implements socket ancillary data on FreeBSD. (#7708)
using LOCAL_CREDS_PERSISTENT/SCM_CREDS2 instead so we also get the send process id.
2022-06-02 14:08:03 +01:00
David Carlier 30c8f3a80f Fix GH-8674: sockets extension won't build for older Linux kernels
In abscence of the needed header, disable the feature altogether.

Closes GH-8677.
2022-06-01 17:33:36 +02:00
Christoph M. Becker 57add48777 Revert "Make socket path shorter for ext/sockets/tests/socket_cmsg_{rights|credentials}.phpt"
This reverts commit b0c1773686, since
this causes CI failures, apparently related to ZTS builds.
2022-05-31 11:22:04 +02:00
Andy Postnikov b0c1773686 Make socket path shorter for ext/sockets/tests/socket_cmsg_{rights|credentials}.phpt
When running in CI it fails when path/address is longer 108

Closes GH-8617.
2022-05-31 10:37:35 +02:00
David CARLIER b14215ab6c sockets add openbsd's SO_RTABLE option, equivalent of Linux's SO_MARK. (#8440) 2022-05-27 13:55:34 +02:00
David CARLIER d1c570f48c Sockets: add constants TCP_KEEPALIVE, TCP_KEEPIDLE, TCP_KEEPINTVL, TCP_KEEPCNT (#8473) 2022-05-27 13:50:32 +02:00
Ilija Tovilo 85d41da32a Merge branch 'PHP-8.1'
* PHP-8.1:
  [skip ci] Add NEWS entry
  Fix undefined behavior in php_set_inet6_addr
  Reduce the scope of XFAIL (#8592)
2022-05-22 23:29:53 +02:00
Ilija Tovilo 7a2747ba78 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix undefined behavior in php_set_inet6_addr
  Reduce the scope of XFAIL (#8592)
2022-05-22 23:27:47 +02:00
Ilija Tovilo f0480eb4de Fix undefined behavior in php_set_inet6_addr
Postfix `++` on `NULL` is undefined behavior

Closes GH-8607
2022-05-22 23:23:47 +02:00
David Carlier 2410e378c1 Add SO_MEMINFO socket option for gathering socket related info 2022-05-20 22:06:53 +01:00
David Carlier 1f4830f21a Add TCP_NOTSENT_LOWAT socket option
Can be used to limit the amount of unsent data per socket.

Closes GH-8559.
2022-05-16 16:01:38 +02:00
Christoph M. Becker ddb04d4872 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix Solaris builds of ext/sockets
2022-03-10 14:52:48 +01:00
Christoph M. Becker f16d35cfe9 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix Solaris builds of ext/sockets
2022-03-10 14:51:30 +01:00
David Carlier 7eb972c456 Fix Solaris builds of ext/sockets
We enable the proper ancillary data handling layout and API.

Closes GH-7859.
2022-03-10 14:48:08 +01:00
Christoph M. Becker 0832d4ab91 Merge branch 'PHP-8.1'
* PHP-8.1:
  Fix GH-7978: sockets extension compilation errors
2022-01-21 23:59:48 +01:00
Christoph M. Becker 943d6f642a Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-7978: sockets extension compilation errors
2022-01-21 23:59:26 +01:00
David Carlier 07aaa34cd4 Fix GH-7978: sockets extension compilation errors
We fix the `ucred` detection when custom `CFLAGS` are in use.

Closes GH-7981.
2022-01-21 23:56:56 +01:00