Ethereal-dev: Re: [Ethereal-dev] OSPFv3 checksum calculation

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxx>
Date: Tue, 27 Nov 2001 22:46:45 -0800
On Wed, Nov 28, 2001 at 11:26:35AM +0900, Taisuke Sasaki wrote:
> Though Ethereal-0.8.20 supports an OSPFv3 dissector,
> it seems that OSPFv3 header checksum calculation is something wrong.
> 
> rfc2470 says that a "pseudo-header" of IPv6 header fields
> is used in OSPFv3 checksum calculation,
> but I cannot find the corresponding source code in latest
> CVS repository(packet-ospf.c).
> 
> below is a temporary patch in OSPFv3 header checksum calculation.

I've checked in a modified version - if the version is neither
OSPF_VERSION_2 nor OSPF_VERSION_3, it doesn't compute the checksum at
all, and instead of constructing the entire pseudo-header it uses the
scatter/gather capabilities of "in_cksum()" (similar to what the TCP
dissector does).

> (I have compiled, but never tested).

I don't have any OSPFv3 captures, so I haven't tested it, either.