From: philipp at caha dot info Operating system: Linux PHP version: 5.2.4 PHP Bug Type: Streams related Bug description: fwrite to a Stream create a wrong checksum
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); -- Edit bug report at http://bugs.php.net/?id=42624&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42624&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42624&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42624&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=42624&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=42624&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=42624&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=42624&r=needscript Try newer version: http://bugs.php.net/fix.php?id=42624&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=42624&r=support Expected behavior: http://bugs.php.net/fix.php?id=42624&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=42624&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=42624&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=42624&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42624&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=42624&r=dst IIS Stability: http://bugs.php.net/fix.php?id=42624&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=42624&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=42624&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=42624&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=42624&r=mysqlcfg