svn commit: r272263 - head/sys/netinet
Michael Tuexen
tuexen at FreeBSD.org
Sun Sep 28 17:22:46 UTC 2014
Author: tuexen
Date: Sun Sep 28 17:22:45 2014
New Revision: 272263
URL: http://svnweb.freebsd.org/changeset/base/272263
Log:
Checksum coverage values larger than 65535 for UDPLite are invalid.
Check for this when the user calls setsockopt using UDPLITE_{SEND,RECV}CSCOV.
Reviewed by: kevlo
MFC after: 3 days
Modified:
head/sys/netinet/udp_usrreq.c
Modified: head/sys/netinet/udp_usrreq.c
==============================================================================
--- head/sys/netinet/udp_usrreq.c Sun Sep 28 17:16:45 2014 (r272262)
+++ head/sys/netinet/udp_usrreq.c Sun Sep 28 17:22:45 2014 (r272263)
@@ -1017,7 +1017,7 @@ udp_ctloutput(struct socket *so, struct
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;
More information about the svn-src-head
mailing list