Hello monks. I'm having a bit of a problem with Net::RawIP and getting the proper ip/udp checksum to generate correctly. According to the documentation, setting "check => 0" would result in the checksum being calculated automatically. I've been trying different combinations of options (setting len, ttl, tos, etc..) with no luck. What am i missing ?
Thanks for any/all help.
- Will.
use Net::RawIP; my $packet = new Net::RawIP({udp=>{check => 0}}); $packet->set({ ip => { saddr => "192.168.10.10", daddr => "192.168.10.20" }, udp => { source => 6544, dest => 514, data => 'test123' } }); $packet->send;
tcpdump shows:
Tested on FreeBSD 9.1 and Net-RawIP-0.25,113:24:07.572481 IP (tos 0x10, ttl 55, id 45453, offset 0, flags [DF], +proto UDP (17), length 35) 192.168.10.10.6544 > 192.168.10.20.514: [bad udp cksum 8!] [|syslo +g]
In reply to Net::RawIP - invalid checksum ? by willambender
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |