From 6dfab5b1e188cd0c939e4e1369db46bb72f7301e Mon Sep 17 00:00:00 2001 From: Garrett Wollman Date: Fri, 22 Sep 1995 19:56:26 +0000 Subject: [PATCH] Merge 4.4-Lite-2: always check the UDP checksum if it is present, even if we are not generating checksums. (Save a test in the input path.) --- sys/netinet/udp_usrreq.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index 3ed0a02cf9fe..dbe6568d951e 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1982, 1986, 1988, 1990, 1993 + * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -30,8 +30,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)udp_usrreq.c 8.4 (Berkeley) 1/21/94 - * $Id: udp_usrreq.c,v 1.12 1995/05/30 08:10:02 rgrimes Exp $ + * @(#)udp_usrreq.c 8.6 (Berkeley) 5/23/95 + * $Id: udp_usrreq.c,v 1.13 1995/08/17 22:09:14 olah Exp $ */ #include @@ -153,7 +153,7 @@ udp_input(m, iphlen) /* * Checksum extended UDP header and data. */ - if (udpcksum && uh->uh_sum) { + if (uh->uh_sum) { ((struct ipovly *)ip)->ih_next = 0; ((struct ipovly *)ip)->ih_prev = 0; ((struct ipovly *)ip)->ih_x1 = 0; @@ -491,7 +491,7 @@ udp_usrreq(so, req, m, addr, control) int s; if (req == PRU_CONTROL) - return (in_control(so, (int)m, (caddr_t)addr, + return (in_control(so, (u_long)m, (caddr_t)addr, (struct ifnet *)control)); if (inp == NULL && req != PRU_ATTACH) { error = EINVAL;