mirror of https://github.com/schoebel/mars
net: use SK_CAN_REUSE
This commit is contained in:
parent
ef0b97efd4
commit
6caf5ef195
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue