diff --git a/kernel/mars_net.c b/kernel/mars_net.c index 35a38435..1b370edc 100644 --- a/kernel/mars_net.c +++ b/kernel/mars_net.c @@ -211,7 +211,7 @@ void _set_socketopts(struct socket *sock, struct mars_tcp_params *params, bool i _setsockopt(sock, SOL_SOCKET, IP_FREEBIND, x_true); } sock->sk->sk_rcvtimeo = sock->sk->sk_sndtimeo = params->tcp_timeout * HZ; - sock->sk->sk_reuse = 1; + sock->sk->sk_reuse = SK_CAN_REUSE; _setsockopt(sock, SOL_SOCKET, SO_SNDBUFFORCE, params->tcp_window_size); _setsockopt(sock, SOL_SOCKET, SO_RCVBUFFORCE, params->tcp_window_size); #ifdef CONFIG_MARS_IPv4_TOS