]> git.baikalelectronics.ru Git - kernel.git/commit
tcp: Add TCP_USER_TIMEOUT negative value check
authorHangbin Liu <liuhangbin@gmail.com>
Thu, 26 Jul 2012 22:52:21 +0000 (22:52 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Jul 2012 20:45:50 +0000 (13:45 -0700)
commit7c88f27d182066989cfca9d5ebcb26c06a6eff20
treea97aede6490c7eea90b83b1bf3bd26037e5485c9
parent9792357208aa280d44887d23dfad93feba79db3a
tcp: Add TCP_USER_TIMEOUT negative value check

TCP_USER_TIMEOUT is a TCP level socket option that takes an unsigned int. But
patch "tcp: Add TCP_USER_TIMEOUT socket option"(665591ab) didn't check the negative
values. If a user assign -1 to it, the socket will set successfully and wait
for 4294967295 miliseconds. This patch add a negative value check to avoid
this issue.

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp.c