Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-bugs: [Wireshark-bugs] [Bug 3112] CDP Checksum Calculation Incorrect

Date: Mon, 5 Jan 2009 14:32:11 -0800 (PST)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3112





--- Comment #26 from Sake <sake@xxxxxxxxxx>  2009-01-05 14:32:10 PDT ---
(In reply to comment #22)
> (In reply to comment #21)
> I'm building a
> program right now that uses winpcap to send out some CDP packets so that I can
> manipulate the checksum before sending them out in an effort to see what is and
> isn't accepted.

An easy way of doing this is using a hex editor (I use hexcurse) to change the
checksum values and then replay the packets using bittwist (or tcpreplay).

> I get the distinctly funny feeling that switches prime the
> checksum with -1 (0xFFFF) and the routers use 0, and that both of these
> calculations are considered valid by both devices.

Nope, I patched my wireshark and edited the tracefile so that the values that
Wireshark calculates are now used as checksum, but when I fire them towards my
2950, it does not accept them (and the Chksum error counter is indeed
incremented by 2).

So it seems there is only one correct checksum for a certain CDP packet. But
somehow the method of calculating the CDP checksum is sending-device dependent
:(


-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.