Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

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 => "", daddr => "" }, udp => { check => 0, source => 6544, dest => 514, data => 'test123' } });



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

Replies are listed 'Best First'.
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) > 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) > [bad udp cksum 0xb59d -> 0 +xbd9d!] [|syslog]


      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
      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


      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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1066051]
[Corion]: I hope all is well marto! ;) My godson had a surprise visit to the hospital yesterday because he fell and had cut his skin besides his eye, but everything was glued together again and all is well
[marto]: good grief, that's not fun, glad to hear all is as well as could be :)
[Corion]: marto: Yeah - their mother picked all three of them up at the kindergarden to then go to the hospital, and all three of them were well behaved, and all also were quite obedient when they came home, so they recognized the situation
[Corion]: Nice to see that the kids have some understanding of important things that happen and the appropriate behaviour :)

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2016-12-08 09:23 GMT
Find Nodes?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:

    Results (137 votes). Check out past polls.