Wireshark-users: [Wireshark-users] IPv6 VRRP checksum

From: Sada Mita <sada_mita@xxxxxxxxx>
Date: Fri, 6 Oct 2006 05:39:58 +0100 (BST)
Hello,

Sorry for the 2nd e-mail, but I'd like to hear your advice.
I'm running 0.99.4-SVN-19188.(Running 0.99.3, the result is the
same.) Is the IPv6 VRRP checksum correctly written in the code?
I still see the checksum incorrect on IPv6 VRRP packet from my DUT.
Could someone check it if the code use the correct checksum.

### Here is the statement from IPv6 VRRP checksum.

5.3.7 Checksum

The checksum field is used to detect data corruption in the VRRP
message.

The checksum is the 16-bit one's complement of the one's complement
sum of the entire VRRP message starting with the version field and a
"pseudo-header" as defined in section 8.1 of RFC2460 [IPv6]. The
next header field in the "pseudo-header" should be set to 112
(decimal) for VRRP. For computing the checksum, the checksum field
is set to zero. See RFC1071 for more detail [CKSM].


###Here is the cut&paste from test2pcap.c

static hdr_ip_t HDR_IP = {0x45, 0, 0, 0x3412, 0, 0, 0xff, 0, 0,
0x01010101, 0x02020202};

static struct { /* pseudo header for checksum calculation */
guint32 src_addr;
guint32 dest_addr;
guint8 zero;
guint8 protocol;
guint16 length;
} pseudoh;


Thanks
Sam