Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/netinet/udp_usrreq.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/netinet/udp_usrreq.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.116 retrieving revision 1.116.2.3 diff -u -p -r1.116 -r1.116.2.3 --- src/sys/netinet/udp_usrreq.c 2004/03/24 15:34:54 1.116 +++ src/sys/netinet/udp_usrreq.c 2004/05/10 15:00:52 1.116.2.3 @@ -1,4 +1,4 @@ -/* $NetBSD: udp_usrreq.c,v 1.116 2004/03/24 15:34:54 atatat Exp $ */ +/* $NetBSD: udp_usrreq.c,v 1.116.2.3 2004/05/10 15:00:52 tron Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: udp_usrreq.c,v 1.116 2004/03/24 15:34:54 atatat Exp $"); +__KERNEL_RCSID(0, "$NetBSD: udp_usrreq.c,v 1.116.2.3 2004/05/10 15:00:52 tron Exp $"); #include "opt_inet.h" #include "opt_ipsec.h" @@ -117,6 +117,7 @@ __KERNEL_RCSID(0, "$NetBSD: udp_usrreq.c #ifdef FAST_IPSEC #include +#include /* XXX ipsecstat namespace */ #ifdef INET6 #include #endif @@ -430,9 +431,11 @@ udp6_input(mp, offp, proto) /* * Checksum extended UDP header and data. */ - if (uh->uh_sum == 0) + if (uh->uh_sum == 0) { udp6stat.udp6s_nosum++; - else if (in6_cksum(m, IPPROTO_UDP, off, ulen) != 0) { + goto bad; + } + if (in6_cksum(m, IPPROTO_UDP, off, ulen) != 0) { udp6stat.udp6s_badsum++; goto bad; }