Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/sys/compat/linux/common Linux does not implement SO_REU...
details: https://anonhg.NetBSD.org/src/rev/f4aec64f5c10
branches: netbsd-1-5
changeset: 493104:f4aec64f5c10
user: jschauma <jschauma%NetBSD.org@localhost>
date: Sat May 11 14:19:20 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.
diffstat:
sys/compat/linux/common/linux_socket.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diffs (25 lines):
diff -r 79701e5444ef -r f4aec64f5c10 sys/compat/linux/common/linux_socket.c
--- a/sys/compat/linux/common/linux_socket.c Sat Apr 27 15:54:47 2002 +0000
+++ b/sys/compat/linux/common/linux_socket.c Sat May 11 14:19:20 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_socket.c,v 1.24.4.2 2001/03/30 22:44:19 he Exp $ */
+/* $NetBSD: linux_socket.c,v 1.24.4.3 2002/05/11 14:19:20 jschauma Exp $ */
/*-
* Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
@@ -264,7 +264,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