wrong udp checksums
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
php5 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Hi. Im running ubuntu-dev (soon to be 7.10) on x64 architecture.
I'm trying to send a UDP packet using PHP (5.2.3-1ubuntu6).
The following script sends one UDP packet. It works correctly (generates correct checksum) on PHP 5.2.3 under Windows XP (32 bit).
However on my Ubuntu machine, the UDP checksum is calculated wrong so the packet is discarded.
<?
$data = 'test123';
$fwd_sock = stream_
if (!$fwd_sock) echo "$errstr ($errno)\n";
stream_
fclose($fwd_sock);
?>
Generated UDP packet:
0000 00 00 03 04 00 00 00 11 95 42 42 49 00 00 08 00 .........BBI....
0010 45 00 00 23 7d 6a 40 00 40 11 bf 5d 7f 00 00 01 E..#}j@.@..]....
0020 7f 00 00 01 80 13 ac a8 00 0f fe 22 74 65 73 74 ..........."test
0030 31 32 33 123
Checksum is 0xfe22. Correct checksum should be 0x8905 according to Wireshark.
Thank you for taking the time to report this bug and helping to make Ubuntu better. www.ussg. iu.edu/ hypermail/ linux/kernel/ 0308.1/ 2205.html. www.wireshark. org/faq. html#q11. 1
The problem you see seems to be the standard Linux implementation for packets send to the local system, see http://
Can you please test to send the packet to a remote system?
Preferably you should check the checksum on the receiving host, as sometimes the checksum is only calculated on the network interface, and not seen correctly by wireshark, see: http://