Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Net::RawIP - invalid checksum ?

by taint (Chaplain)
on Dec 06, 2013 at 20:10 UTC ( #1066051=note: print w/ replies, xml ) Need Help??


in reply to Net::RawIP - invalid checksum ?

Greetings williambender

I don't have tcpdump installed, so I don't know that I can check it. But would the following possibly work

use Net::RawIP; my $packet = new Net::RawIP(); $packet->set({ ip => { saddr => "192.168.10.10", daddr => "192.168.10.20" }, udp => { check => 0, source => 6544, dest => 514, data => 'test123' } });

HTH

--Chris

Hey. I'm not completely useless. I can be used as a bad example.


Comment on Re: Net::RawIP - invalid checksum ?
Download Code
Re^2: Net::RawIP - invalid checksum ?
by willambender (Initiate) on Dec 06, 2013 at 21:10 UTC

    Negitive. I now get.. (Defaults to TCP, src/dst ports are now 0)

    14:46:44.553547 IP (tos 0x0, ttl 60, id 35744, offset 0, flags [DF], p +roto TCP (6), length 40) 192.168.10.10.0 > 192.168.10.20.0: Flags [DF], cksum 0xcd50 (incor +rect -> 0xd550), seq 0, win 65535, length 0

    If i use your example and just change...

    my $packet = new Net::RawIP({udp => {check => 0}});

    Or even..

    my $packet = new Net::RawIP({udp => {}});

    I still get a bad checkdum...

    4:47:22.542872 IP (tos 0x0, ttl 60, id 35885, offset 0, flags [DF], pr +oto UDP (17), length 35) 192.168.10.10.6544 > 192.168.10.20.514: [bad udp cksum 0xb59d -> 0 +xbd9d!] [|syslog]

    -Will

      Well. Like I said, I couldn't test it. I was just trying to help with a possible alternative.

      I notice after reading both the docs, and source. There's precious little, regarding the check option.

      OTOH I notice
      Net::RawIP::opt
      and
      Net::RawIP::udphdr
      Perhaps experimenting with them, might yield some positive results?

      Just a thought. Not being able to test it myself. I'm afraid that's all I got.

      Best wishes

      --Chris

      Hey. I'm not completely useless. I can be used as a bad example.
      

        Thanks, i appreciate any help i can get on this. :) I'll definitely take a look at those other options and post back with my findings. Thanks again.
        - Will

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1066051]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2014-07-31 06:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (245 votes), past polls