net: use SK_CAN_REUSE

This commit is contained in:
Thomas Schoebel-Theuer 2023-07-11 13:09:49 +02:00
parent ef0b97efd4
commit 6caf5ef195
1 changed files with 1 additions and 1 deletions

View File

@ -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); _setsockopt(sock, SOL_SOCKET, IP_FREEBIND, x_true);
} }
sock->sk->sk_rcvtimeo = sock->sk->sk_sndtimeo = params->tcp_timeout * HZ; 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_SNDBUFFORCE, params->tcp_window_size);
_setsockopt(sock, SOL_SOCKET, SO_RCVBUFFORCE, params->tcp_window_size); _setsockopt(sock, SOL_SOCKET, SO_RCVBUFFORCE, params->tcp_window_size);
#ifdef CONFIG_MARS_IPv4_TOS #ifdef CONFIG_MARS_IPv4_TOS