Raw IPv6 checksum must use the protocol number of the last header, instead of the first next-header value.

Obtained from: KAME
MFC after: 1 day
This commit is contained in:
SUZUKI Shinsuke 2005-10-19 01:21:49 +00:00
parent 02341dd12e
commit 4350fcab1b

View File

@ -167,7 +167,7 @@ rip6_input(mp, offp, proto)
goto docontinue;
if (in6p->in6p_cksum != -1) {
rip6stat.rip6s_isum++;
if (in6_cksum(m, ip6->ip6_nxt, *offp,
if (in6_cksum(m, proto, *offp,
m->m_pkthdr.len - *offp)) {
rip6stat.rip6s_badsum++;
goto docontinue;