[PATCH] net/proto-unix.c: set protocol to 0 in unix_rand_socket()

Fabien Siron <[email protected]> Tue, 5 Jul 2016 10:02:46 +0000
Newsgroups org.kernel.vger.trinity
Message-ID <[email protected]>
The protocol of an AF_UNIX socket should be 0.

Signed-off-by: Fabien Siron <[email protected]>
---
 net/proto-unix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/proto-unix.c b/net/proto-unix.c
index 2ef0457..8d1ee9a 100644
--- a/net/proto-unix.c
+++ b/net/proto-unix.c
@@ -24,7 +24,7 @@ static void unix_gen_sockaddr(struct sockaddr **addr, socklen_t *addrlen)
 
 static void unix_rand_socket(struct socket_triplet *st)
 {
-	st->protocol = PF_UNIX;
+	st->protocol = 0;
 
 	switch (rnd() % 3) {
 	case 0: st->type = SOCK_STREAM;
-- 
2.9.0