diff options
author | wollman <wollman@FreeBSD.org> | 1995-09-22 19:56:26 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1995-09-22 19:56:26 +0000 |
commit | 1d9235770f2fab4c1d8ed542aa5e65d7f8a8cf32 (patch) | |
tree | 72ff4300e179bab1f7169564aad9afd50e920434 /sys/netinet/udp_usrreq.c | |
parent | fe9800b86b648ddcde4e28736fb304c5e646c309 (diff) | |
download | FreeBSD-src-1d9235770f2fab4c1d8ed542aa5e65d7f8a8cf32.zip FreeBSD-src-1d9235770f2fab4c1d8ed542aa5e65d7f8a8cf32.tar.gz |
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.)
Diffstat (limited to 'sys/netinet/udp_usrreq.c')
-rw-r--r-- | sys/netinet/udp_usrreq.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index 3ed0a02..dbe6568 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 <sys/param.h> @@ -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; |