summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2014-10-06 13:12:04 +0000
committertuexen <tuexen@FreeBSD.org>2014-10-06 13:12:04 +0000
commit0be9f8014d258337bc8efe76d354e9c9f4c58091 (patch)
tree32f34abdb935572a0752a0802a4fd9d984d05bd0 /sys/netinet
parent5951623a23317e5a9942b22b0e629a2e5a10057a (diff)
downloadFreeBSD-src-0be9f8014d258337bc8efe76d354e9c9f4c58091.zip
FreeBSD-src-0be9f8014d258337bc8efe76d354e9c9f4c58091.tar.gz
MFC r272263:
Checksum coverage values larger than 65535 for UDPLite are invalid. Check for this when the user calls setsockopt using UDPLITE_{SEND,RECV}CSCOV.
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/udp_usrreq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index 20e4534..a3a365a 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -1006,7 +1006,7 @@ udp_ctloutput(struct socket *so, struct sockopt *sopt)
INP_WLOCK(inp);
up = intoudpcb(inp);
KASSERT(up != NULL, ("%s: up == NULL", __func__));
- if (optval != 0 && optval < 8) {
+ if ((optval != 0 && optval < 8) || (optval > 65535)) {
INP_WUNLOCK(inp);
error = EINVAL;
break;
OpenPOWER on IntegriCloud