Commit 592f6469 authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] Only set ->sk_reuse for tcp sockets, not udp

It doesn't really make sense for udp.
parent 613d9c3b
......@@ -1377,7 +1377,8 @@ svc_create_socket(struct svc_serv *serv, int protocol, struct sockaddr_in *sin)
return error;
if (sin != NULL) {
sock->sk->sk_reuse = 1; /* allow address reuse */
if (type == SOCK_STREAM)
sock->sk->sk_reuse = 1; /* allow address reuse */
error = sock->ops->bind(sock, (struct sockaddr *) sin,
sizeof(*sin));
if (error < 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment