Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/linux/common Linux does not implement SO_REUSEPOR...
details: https://anonhg.NetBSD.org/src/rev/bbe3bf3dacbc
branches: trunk
changeset: 526840:bbe3bf3dacbc
user: jschauma <jschauma%NetBSD.org@localhost>
date: Sun May 12 18:30:32 2002 +0000
description:
Linux does not implement SO_REUSEPORT, but allows reuse of a
host:port pair through SO_REUSEADDR even if the address is not a
multicast-address. Effectively, this means that we should use
SO_REUSEPORT when SO_REUSEADDR is set (from the linux process)
to allow Linux applications to not exit with EADDRINUSE.
(Previously erraneously applied to 1.5 branch; approved for
proper location by thorpej)
diffstat:
sys/compat/linux/common/linux_socket.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diffs (34 lines):
diff -r 76c3f6f8d08f -r bbe3bf3dacbc sys/compat/linux/common/linux_socket.c
--- a/sys/compat/linux/common/linux_socket.c Sun May 12 16:51:06 2002 +0000
+++ b/sys/compat/linux/common/linux_socket.c Sun May 12 18:30:32 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_socket.c,v 1.38 2002/04/08 14:00:31 christos Exp $ */
+/* $NetBSD: linux_socket.c,v 1.39 2002/05/12 18:30:32 jschauma Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -47,7 +47,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.38 2002/04/08 14:00:31 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.39 2002/05/12 18:30:32 jschauma Exp $");
#if defined(_KERNEL_OPT)
#include "opt_inet.h"
@@ -440,7 +440,14 @@
case LINUX_SO_DEBUG:
return SO_DEBUG;
case LINUX_SO_REUSEADDR:
- return SO_REUSEADDR;
+ /*
+ * Linux does not implement SO_REUSEPORT, but allows reuse of a
+ * host:port pair through SO_REUSEADDR even if the address is not a
+ * multicast-address. Effectively, this means that we should use
+ * SO_REUSEPORT to allow Linux applications to not exit with
+ * EADDRINUSE
+ */
+ return SO_REUSEPORT;
case LINUX_SO_TYPE:
return SO_TYPE;
case LINUX_SO_ERROR:
Home |
Main Index |
Thread Index |
Old Index