Source-Changes-HG archive

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

[src/netbsd-1-6]: src/sys/netinet Pull up revision 1.117 (requested by itojun...



details:   https://anonhg.NetBSD.org/src/rev/4a1a1b1c2fc4
branches:  netbsd-1-6
changeset: 531215:4a1a1b1c2fc4
user:      tron <tron%NetBSD.org@localhost>
date:      Wed Mar 31 20:09:25 2004 +0000

description:
Pull up revision 1.117 (requested by itojun in ticket #1645):
drop packet if IPv6 udp packet does not have checksum (checksum is mandatory
in IPv6).

diffstat:

 sys/netinet/udp_usrreq.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (31 lines):

diff -r 3c3924f7db78 -r 4a1a1b1c2fc4 sys/netinet/udp_usrreq.c
--- a/sys/netinet/udp_usrreq.c  Mon Mar 29 08:43:03 2004 +0000
+++ b/sys/netinet/udp_usrreq.c  Wed Mar 31 20:09:25 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: udp_usrreq.c,v 1.93 2002/05/12 20:33:51 matt Exp $     */
+/*     $NetBSD: udp_usrreq.c,v 1.93.4.1 2004/03/31 20:09:25 tron Exp $ */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -65,7 +65,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: udp_usrreq.c,v 1.93 2002/05/12 20:33:51 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udp_usrreq.c,v 1.93.4.1 2004/03/31 20:09:25 tron Exp $");
 
 #include "opt_inet.h"
 #include "opt_ipsec.h"
@@ -445,9 +445,10 @@
        /*
         * 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;
+       } else if (in6_cksum(m, IPPROTO_UDP, off, ulen) != 0) {
                udp6stat.udp6s_badsum++;
                goto bad;
        }



Home | Main Index | Thread Index | Old Index