php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42624 fwrite to a Stream create a wrong checksum
Submitted: 2007-09-11 17:28 UTC Modified: 2007-09-20 01:00 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: philipp at caha dot info Assigned:
Status: No Feedback Package: Streams related
PHP Version: 5.2.4 OS: Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2007-09-11 17:28 UTC] philipp at caha dot info
Description:
------------
I write Data to a Socket, but it comes some incorrect checksum (dump with tcpdump)

Dump :

00:16:76:df:12:eb (oui Unknown) > 00:04:23:c1:72:23 (oui Unknown), ethertype IPv4 (0x0800), length 64: (tos 0x0, ttl  64, id 63018, offset 0, flags [DF], proto: TCP (6), length: 50) 10.10.1.22.dnsix > mk089144217176.a1.net.sbl: P, cksum 0x3e85 (incorrect (-> 0x261b), 1:11(10) ack 118 win 5840 urg 10
        0x0000:  4500 0032 f62a 4000 4006 063b 0a0a 0116
        0x0010:  5990 d9b0 005a 040f 1cc2 054c 0005 0ecc
        0x0020:  5038 16d0 3e85 000a 3031 3334 3036 3936
        0x0030:  3233

Reproduce code:
---------------
$socket = stream_socket_server('tcp://10.10.1.22:90', $errno, $errstr);
$conn = @stream_socket_accept($socket, 1);
$message = fread($conn, 8192);
$answer = "0134069623";
fwrite($conn, $answer);
fclose ($conn);
fclose($socket);


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-09-12 11:54 UTC] jani@php.net
See "Example 2368. Using TCP server sockets" on page:

http://www.php.net/stream_socket_server

Try with that example. And make sure there aren't any firewalls/proxies/etc. interfering.
 [2007-09-20 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC