Commit Graph

79 Commits

Author SHA1 Message Date
Anatol Belski
a3f82ae0ee fix expected warning in test 2014-08-31 14:02:31 +02:00
Xinchen Hui
0d3cd2486a Finish ext/sockets 2014-05-18 12:02:05 +08:00
Gustavo Lopes
2443df37fd Merge branch 'PHP-5.5'
* PHP-5.5:
  NEWS for 710150c and e2744f1
  socket: support unix paths in the abstract namespace
  socket: fix bug #65260 (SCM_RIGHTS)
2013-07-16 00:03:00 +02:00
Gustavo Lopes
710150ccb7 socket: support unix paths in the abstract namespace
Those starting with '\0'.
2013-07-15 23:57:51 +02:00
Gustavo Lopes
e2744f1aa3 socket: fix bug #65260 (SCM_RIGHTS)
The data for messages of type SOL_SOCKET/SCM_RIGHTS was not being
passed correctly. There were actually two bugs: (1) the number of file
descriptors being passed was being read incorrectly (the length of the
cmsg array was being read instead of that of its 'data' element), as a
result it was generally being reported as always three elements
('level', 'type' and 'data') and (2) the allocated block for writing
the file descriptors was being acessed incorrectly because a 1-based
counter was being used as if it was 0-based.

Any of these two bugs would probably be enough to cause heap
corruption.
2013-07-15 23:57:49 +02:00
Stanislav Malyshev
e02b41d25c Merge branch 'PHP-5.5'
* PHP-5.5:
  Implements feature Bug #63472 ability to set SO_BINDTODEVICE on socket.
2013-06-23 15:26:30 -07:00
Stanislav Malyshev
1beb24bd6f Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Implements feature Bug #63472 ability to set SO_BINDTODEVICE on socket.

Conflicts:
	ext/sockets/sockets.c
2013-06-23 15:26:14 -07:00
Damjan Cvetko
a0b4348abc Implements feature Bug #63472 ability to set SO_BINDTODEVICE on socket. 2013-06-23 15:20:54 -07:00
Sara Golemon
e836f8e38f Oops 2013-04-30 19:43:52 -07:00
Sara Golemon
e217db8e69 Harden loopback tests
These tests depend on being able to bind port 31337.
Try a range of ports until one binds or we give up trying.
2013-04-30 19:30:55 -07:00
Xinchen Hui
082741814a skip if no IPv6 support 2013-03-05 17:18:13 +08:00
Xinchen Hui
e5d0dc24d2 Fix tests temporary
seems IPV6_PKTINFO are not avaiable in some OS
2013-03-05 16:56:00 +08:00
Xinchen Hui
1978dae309 Skip test on Apple 2013-03-05 14:02:28 +08:00
Xinchen Hui
3f67d5ae43 Revert "Fixed Bug #64340 (sockets tests failed) Patch by Reeze"
build break, will only leave the test script fix first

This reverts commit f2246f352f.
2013-03-05 13:58:20 +08:00
Xinchen Hui
46e612ada4 Merge branch 'PHP-5.4' into PHP-5.5 2013-03-03 11:25:29 +08:00
Xinchen Hui
9bda6a25a5 Fix test (skip on unable to create socket) 2013-03-03 11:24:45 +08:00
Xinchen Hui
f2246f352f Fixed Bug #64340 (sockets tests failed) Patch by Reeze
Add __APPLE_USE_RFC_3542 for OS X 10.7 because IPv6 options are incompatible with RFC 2292.
2013-03-03 10:51:04 +08:00
Gustavo Lopes
8771c265a4 Fix test on Windows.
Windows complains of invalid parameters because the socket is not bound.
The test expected the error to be EAGAIN/EWOULDBLOCK. Moved the call down,
after the socket is bound.
2013-02-03 02:03:00 +01:00
Gustavo Lopes
7066cc7267 send/recvmsg() support for Windows 2013-02-02 16:38:09 +01:00
Gustavo Lopes
66ea024587 Support sticky IPV6_PKTINFO 2013-02-02 16:38:08 +01:00
Gustavo Lopes
3e515a2fd9 Fix mcast_ipv6_send test 2013-02-02 16:38:07 +01:00
Gustavo Lopes
74cf40c2fd Add test for CMSG_RIGHTS 2013-02-02 16:38:06 +01:00
Gustavo Lopes
7fc4671df9 Add test for CMSG_CREDENTIALS message 2013-02-02 16:38:06 +01:00
Gustavo Lopes
0f849fe2aa Add test and slightly tweak another 2013-02-02 16:38:06 +01:00
Gustavo Lopes
eb4b1f6d46 Add test for recvmsg() 2013-02-02 16:38:05 +01:00
Gustavo Lopes
ac47448abb Ignore warnings on EAGAIN/EWOULDBLOCK/EINPROGRESS
See bug #63570
2013-02-02 15:43:05 +01:00
Gustavo Lopes
40663ede83 Fix tests (Windows) 2013-02-02 15:29:18 +01:00
Gustavo Lopes
a100c25ea4 Fix overbroad skipif include 2013-02-02 14:06:23 +01:00
Remi Collet
9d75bf35e9 Mark this test as requiring internet connecion. 2013-01-31 14:38:39 +01:00
Remi Collet
f7362232f4 Fix failed test: sys_errlist[116] have changed on recent glibc (Fedora 18)
old: Stale NFS file handle
new: Stale file handle
2013-01-31 14:22:56 +01:00
Remi Collet
3732fa95c5 fix failing test on Linux build 2012-12-19 10:23:57 +01:00
Anatoliy Belsky
b8553d8494 Revert the previous test fix
The fail seems to be due to network error
2012-12-03 15:14:43 +01:00
Anatoliy Belsky
89e547ce7f Fix test with a slightly different warning in TS 2012-12-03 10:41:17 +01:00
Igor Wiedler
ec2a132f9c Bug #49341: Add SO_REUSEPORT support for socket_set_option()
This is a BSD-only feature, and it will only be available on BSD.
On other platforms the constant will simply not be set.
2012-12-02 18:56:57 +01:00
Lars Strojny
188c124a57 Bug #63000: MCAST_JOIN_GROUP on OSX is broken
The multicast support in PHP 5.4 makes use of MCAST_JOIN_GROUP if it is present.
The problem is that OSX 10.7 added the constant, but did not correctly implement
the feature. This causes the setsockopt call to fail.

The solution to the problem is to not use MCAST_JOIN_GROUP on OSX.

For reference, this was also done in VLC:

* http://trac.videolan.org/vlc/ticket/6104#comment:19
2012-09-19 22:17:35 +02:00
Anatoliy Belsky
97b8798520 Fixed test bug #62312 (warnings changed one more time) 2012-07-09 18:21:51 +02:00
Marc Easen
896ac689c9 Fixed the common misspelling of the word occurred (occured -> occurred) 2012-06-30 16:54:03 -07:00
Anatoliy Belsky
280e3a4ec8 Fixed bug #62312 ext\sockets\tests\socket_import_stream-4.phpt fails 2012-06-14 18:02:53 +02:00
Anatoliy Belsky
024cd2a124 Fixed bug #61638 Test ext\sockets\tests\unixloop.phpt fails 2012-04-10 14:00:51 +02:00
Anatoliy Belsky
bbab846ada Fixed bug #61637 ext\sockets\tests\socket_sentto_recvfrom_unix.phpt 2012-04-10 14:00:50 +02:00
Anatoliy Belsky
70f2f30e67 Fixed bug #61635 ext\sockets\tests\socket_select-wrongparams-1.phpt 2012-04-10 14:00:50 +02:00
Anatoliy Belsky
006b04da4a Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Fixed bug #61634 Test ext\sockets\tests\socket_listen-wrongparams.phpt fails
  Fixed bug #61633 Test ext\sockets\tests\socket_create_pair-wrongparams.phpt fails
  Fixed bug #61632 Test ext\sockets\tests\socket_create_listen.phpt fails
  Fixed bug 61621 Test fail in ext/standard/tests/dir
2012-04-10 13:09:48 +02:00
Anatoliy Belsky
c4676ee99f Fixed bug #61634 Test ext\sockets\tests\socket_listen-wrongparams.phpt fails 2012-04-10 13:08:57 +02:00
Anatoliy Belsky
5b0e7203e6 Fixed bug #61633 Test ext\sockets\tests\socket_create_pair-wrongparams.phpt fails 2012-04-10 13:06:15 +02:00
Anatoliy Belsky
83b48280c7 Fixed bug #61632 Test ext\sockets\tests\socket_create_listen.phpt fails 2012-04-10 13:06:14 +02:00
Anatoliy Belsky
5594fcf423 Fixed bug #61633 Test ext\sockets\tests\socket_create_pair-wrongparams.phpt fails 2012-04-10 13:02:53 +02:00
Anatoliy Belsky
37cb29ae90 Fixed bug #61632 Test ext\sockets\tests\socket_create_listen.phpt fails 2012-04-10 12:57:10 +02:00
Stanislav Malyshev
d42917b605 test fixes 2011-12-26 03:22:07 +00:00
Gustavo André dos Santos Lopes
5759a440f8 - Small ajustments to some multicast options. 2011-11-26 17:48:52 +00:00
Xinchen Hui
0f672ac0ba fixed typo 2011-09-07 00:56:52 +00:00