summaryrefslogtreecommitdiffstats
path: root/sys/netinet/udp_usrreq.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2006-12-31 21:34:53 +0000
committerimp <imp@FreeBSD.org>2006-12-31 21:34:53 +0000
commit426d73c7621f2b4a511a83b5c445ad540b824330 (patch)
tree75ceee608be7cbb7222afa24cc2bbe7aac71e01c /sys/netinet/udp_usrreq.c
parentb790270fcf047b99270bdf23da783ad7e7551b43 (diff)
downloadFreeBSD-src-426d73c7621f2b4a511a83b5c445ad540b824330.zip
FreeBSD-src-426d73c7621f2b4a511a83b5c445ad540b824330.tar.gz
Add comment about udp checksums being off in BSD 4.2 compatibility mode.
Submitted by: Dr. Markus Waldeck PR: kern/106657
Diffstat (limited to 'sys/netinet/udp_usrreq.c')
-rw-r--r--sys/netinet/udp_usrreq.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index 52c4af5..701fe73 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -93,10 +93,17 @@
* UDP protocol implementation.
* Per RFC 768, August, 1980.
*/
+
+/*
+ * BSD 4.2 defaulted the udp checksum to be off. Turning off udp
+ * checksums removes the only data integrety mechanism for packets and
+ * malformed packets that would otherwise be discarded by bad checksums
+ * may cause problems (espeically for NFS data blocks).
+ */
#ifndef COMPAT_42
static int udpcksum = 1;
#else
-static int udpcksum = 0; /* XXX */
+static int udpcksum = 0;
#endif
SYSCTL_INT(_net_inet_udp, UDPCTL_CHECKSUM, checksum, CTLFLAG_RW,
&udpcksum, 0, "");
OpenPOWER on IntegriCloud