Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netinet6 fix IPV6_CHECKSUM socket option (length computa...



details:   https://anonhg.NetBSD.org/src/rev/f3fb6d542242
branches:  trunk
changeset: 474769:f3fb6d542242
user:      itojun <itojun%NetBSD.org@localhost>
date:      Mon Jul 19 18:37:19 1999 +0000

description:
fix IPV6_CHECKSUM socket option (length computation was wrong).

diffstat:

 sys/netinet6/raw_ip6.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (20 lines):

diff -r 3957519bb5de -r f3fb6d542242 sys/netinet6/raw_ip6.c
--- a/sys/netinet6/raw_ip6.c    Mon Jul 19 17:45:23 1999 +0000
+++ b/sys/netinet6/raw_ip6.c    Mon Jul 19 18:37:19 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: raw_ip6.c,v 1.6 1999/07/09 22:57:30 thorpej Exp $      */
+/*     $NetBSD: raw_ip6.c,v 1.7 1999/07/19 18:37:19 itojun Exp $       */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -168,8 +168,8 @@
                   !IN6_ARE_ADDR_EQUAL(&in6p->in6p_faddr, &ip6->ip6_src))
                        continue;
                if (in6p->in6p_cksum != -1
-                && in6_cksum(m, ip6->ip6_nxt, *offp,
-                        sizeof(struct ip6_hdr) + ip6->ip6_plen - *offp)) {
+                && in6_cksum(m, ip6->ip6_nxt, *offp, m->m_pkthdr.len - *offp))
+               {
                        /* XXX bark something */
                        continue;
                }



Home | Main Index | Thread Index | Old Index