Mailing List Archive

ipv6: incorrect checksums in router advs
Hello

I received the following bug report through the Debian bug tracking
system. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=225919

Can you please comment the patch?

bye,

-christian-

> From: Anand Kumria <wildfire@progsoc.org>
> Date: Sat, 03 Jan 2004 02:15:35 +1100
...
> When used with a network of Debian 3.0 machines, quagga will generate
> router advertisements (RAs) with a checksum of 0000. This is incorrect
> and will cause those machine to (eventually) time out their global route
> to the IPv6 Internet.
>
> This has caused a number of system of mine to become unusable over the
> last few days. I have managed to track down the problem to a change in
> rtadv.c revisions 1.2 and 1.3.
>
> --- quagga-0.96.4x.orig/zebra/rtadv.c
> +++ quagga-0.96.4x/zebra/rtadv.c
> @@ -434,6 +434,9 @@
> ret = setsockopt_ipv6_pktinfo (sock, 1);
> if (ret < 0)
> return ret;
> + ret = setsockopt_ipv6_checksum (sock, 2);
> + if (ret < 0)
> + return ret;
> ret = setsockopt_ipv6_multicast_loop (sock, 0);
> if (ret < 0)
> return ret;
>
> I've done some testing with other kernel versions, here is what I have
> found:
>
> 2.4.18: patch required
> 2.4.19: unknown?
> 2.4.20: unknown?
> 2.4.21: unknown?
> 2.4.22: not required
> 2.4.23: not required
> 2.6+: not required
>
> If you like I can write up a patch which will only do this only on the
> required kernel versions once I know the status of 2.4.19 - 2.4.21
>
> Thanks,
> Anand
Re: ipv6: incorrect checksums in router advs [ In reply to ]
On Sun, 4 Jan 2004, Christian Hammers wrote:

> Hello
>
> I received the following bug report through the Debian bug tracking
> system. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=225919
>
> Can you please comment the patch?

A GNU Zebra change, following commit message:

"
From: Jun-ichiro itojun Hagino <itojun@iijlab.net>
Subject: [zebra 11052] setsockopt(IPV6_CHECKSUM) does not work for
ICMPv6
socket

setsockopt(IPV6_CHECKSUM) does not work for ICMPv6 socket.
RFC2292 may not be clear enough about it (it talks about raw socket
and ICMPv6 socket mixed up), but the next revision
(draft-ietf-ipngwg-rfc2292bis-02.txt) is very clear about it.
> An attempt to set IPV6_CHECKSUM for an ICMPv6 socket will fail.
"

Essentially, he needs a newer kernel. Or we need to know exactly
which uname() (struct utsname) sysname and version strings have and
dont have the incorrect behaviour so as to determine at whether to
checksum the socket or not at runtime - ie far too kludgy -> upgrade
kernel.

> bye,

regards,
--
Paul Jakma paul@clubi.ie paul@jakma.org Key ID: 64A2FF6A
warning: do not ever send email to spam@dishone.st
Fortune:
Anyone can hold the helm when the sea is calm.
-- Publius Syrus