trinity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net/proto-unix.c: set protocol to 0 in unix_rand_socket()
@ 2016-07-05 10:02 Fabien Siron
  0 siblings, 0 replies; only message in thread
From: Fabien Siron @ 2016-07-05 10:02 UTC (permalink / raw)
  To: trinity; +Cc: Fabien Siron

The protocol of an AF_UNIX socket should be 0.

Signed-off-by: Fabien Siron <fabien.siron@epita.fr>
---
 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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-07-05 10:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-05 10:02 [PATCH] net/proto-unix.c: set protocol to 0 in unix_rand_socket() Fabien Siron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).