inet/ipv4_setsockopt.c:fix libuv udp option error

Signed-off-by: wangchen <wangchen41@xiaomi.com>
This commit is contained in:
wangchen 2023-08-03 10:34:02 +08:00 committed by Xiang Xiao
parent 4f0a8dc391
commit 44442a655e

View File

@ -195,7 +195,7 @@ int ipv4_setsockopt(FAR struct socket *psock, int option,
ttl = (value_len >= sizeof(int)) ?
*(FAR int *)value : (int)*(FAR unsigned char *)value;
if (ttl <= 0 || ttl > 255)
if (ttl < 0 || ttl > 255)
{
ret = -EINVAL;
}