fix IPV6_CHECKSUM socket option (length computation was wrong).

This commit is contained in:
itojun 1999-07-19 18:37:19 +00:00
parent 5310e69363
commit 869f140395

View File

@ -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. * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -168,8 +168,8 @@ rip6_input(mp, offp, proto)
!IN6_ARE_ADDR_EQUAL(&in6p->in6p_faddr, &ip6->ip6_src)) !IN6_ARE_ADDR_EQUAL(&in6p->in6p_faddr, &ip6->ip6_src))
continue; continue;
if (in6p->in6p_cksum != -1 if (in6p->in6p_cksum != -1
&& in6_cksum(m, ip6->ip6_nxt, *offp, && in6_cksum(m, ip6->ip6_nxt, *offp, m->m_pkthdr.len - *offp))
sizeof(struct ip6_hdr) + ip6->ip6_plen - *offp)) { {
/* XXX bark something */ /* XXX bark something */
continue; continue;
} }