]> 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)
commit73b42be5ed6170dad67f044afb9d170705049a2e
treea97aede6490c7eea90b83b1bf3bd26037e5485c9
parent4986b0fefb42420f74382854b11cc235cf2c30c8
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