Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Dec 2004 02:29:11 +0100
From:      Daniel Hartmeier <daniel@benzedrine.cx>
To:        Bernhard Schmidt <berni@birkenwald.de>
Cc:        freebsd-pf@freebsd.org
Subject:   Re: IPv6 MLD packets blocked
Message-ID:  <20041205012911.GC32476@insomnia.benzedrine.cx>
In-Reply-To: <1102191882.12613.39.camel@cholera>
References:  <slrncr28gr.ig8.berni@bschmidt.msgid.cybernet-ag.net> <20041204200312.GE32076@insomnia.benzedrine.cx> <1102191882.12613.39.camel@cholera>

next in thread | previous in thread | raw e-mail | index | archive | help
Can you try the patch below? I was able to reproduce the problem and
this solves it for me.

Daniel


Index: pf.c
===================================================================
RCS file: /cvs/freebsd/src/sys/contrib/pf/net/pf.c,v
retrieving revision 1.23
diff -u -r1.23 pf.c
--- pf.c	24 Nov 2004 00:43:34 -0000	1.23
+++ pf.c	5 Dec 2004 01:29:17 -0000
@@ -6334,7 +6334,8 @@
 			goto done;
 		}
 		if (dir == PF_IN && pf_check_proto_cksum(m, off,
-		    ntohs(h->ip6_plen), IPPROTO_TCP, AF_INET6)) {
+		    ntohs(h->ip6_plen) - (off - sizeof(struct ip6_hdr)),
+		    IPPROTO_TCP, AF_INET6)) {
 			action = PF_DROP;
 			goto done;
 		}
@@ -6372,7 +6373,8 @@
 			goto done;
 		}
 		if (dir == PF_IN && uh.uh_sum && pf_check_proto_cksum(m,
-		    off, ntohs(h->ip6_plen), IPPROTO_UDP, AF_INET6)) {
+		    off, ntohs(h->ip6_plen) - (off - sizeof(struct ip6_hdr)),
+		    IPPROTO_UDP, AF_INET6)) {
 			action = PF_DROP;
 			goto done;
 		}
@@ -6411,7 +6413,8 @@
 			goto done;
 		}
 		if (dir == PF_IN && pf_check_proto_cksum(m, off,
-		    ntohs(h->ip6_plen), IPPROTO_ICMPV6, AF_INET6)) {
+		    ntohs(h->ip6_plen)  - (off - sizeof(struct ip6_hdr)),
+		    IPPROTO_ICMPV6, AF_INET6)) {
 			action = PF_DROP;
 			goto done;
 		}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041205012911.GC32476>