svn commit: r272627 - stable/10/sys/netinet

Michael Tuexen tuexen at FreeBSD.org
Mon Oct 6 13:12:05 UTC 2014


Author: tuexen
Date: Mon Oct  6 13:12:04 2014
New Revision: 272627
URL: https://svnweb.freebsd.org/changeset/base/272627

Log:
  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.

Modified:
  stable/10/sys/netinet/udp_usrreq.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/netinet/udp_usrreq.c
==============================================================================
--- stable/10/sys/netinet/udp_usrreq.c	Mon Oct  6 12:54:06 2014	(r272626)
+++ stable/10/sys/netinet/udp_usrreq.c	Mon Oct  6 13:12:04 2014	(r272627)
@@ -1006,7 +1006,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-stable-10 mailing list