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
This commit is contained in:
parent
aab771d812
commit
186c8f6391
@ -1017,7 +1017,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;
|
||||
|
Loading…
Reference in New Issue
Block a user