[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 0/5] Do not set SO_REUSEADDR on Windows
From: |
Sebastian Ottlik |
Subject: |
[Qemu-devel] [PATCH v2 0/5] Do not set SO_REUSEADDR on Windows |
Date: |
Wed, 4 Sep 2013 19:08:50 +0200 |
This patchset disabels all use of SO_REUSEADDR on Windows. On Windows systems
the default behaviour is equivalent to SO_REUSEADDR on other operating
systems. SO_REUSEADDR can still be set but results in undesired behaviour
instead. It may even lead to situations were system behaviour is
unspecified. More information on this can be found at:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms740621.aspx
I originally encountered this issue when accidentally launching two QEMU
instances with identical GDB ports at the same time. In which case QEMU won't
fail as one might expect.
v2 Changes:
- Introduce a function with os specific implementation instead of using #ifdef
I named it socket_set_fast_reuse instead of the suggested qemu_set_reuseaddr
so the name better reflects what the function actually does.
gdbstub.c | 6 ++----
include/qemu/sockets.h | 1 +
net/socket.c | 19 +++++++------------
slirp/misc.c | 3 +--
slirp/socket.c | 4 +---
slirp/tcp_subr.c | 6 ++----
slirp/udp.c | 4 ++--
util/oslib-posix.c | 14 ++++++++++++++
util/oslib-win32.c | 10 ++++++++++
util/qemu-sockets.c | 6 +++---
10 files changed, 43 insertions(+), 30 deletions(-)
util: add socket_set_fast_reuse function
gdbstub: call socket_set_fast_reuse instead of setting SO_REUSEADDR
net: call socket_set_fast_reuse instead of setting SO_REUSEADDR
slirp: call socket_set_fast_reuse instead of setting SO_REUSEADDR
util: call socket_set_fast_reuse instead of setting SO_REUSEADDR
- [Qemu-devel] [PATCH v2 0/5] Do not set SO_REUSEADDR on Windows,
Sebastian Ottlik <=
- [Qemu-devel] [PATCH v2 2/5] gdbstub: call socket_set_fast_reuse instead of setting SO_REUSEADDR, Sebastian Ottlik, 2013/09/04
- [Qemu-devel] [PATCH v2 5/5] util: call socket_set_fast_reuse instead of setting SO_REUSEADDR, Sebastian Ottlik, 2013/09/04
- [Qemu-devel] [PATCH v2 4/5] slirp: call socket_set_fast_reuse instead of setting SO_REUSEADDR, Sebastian Ottlik, 2013/09/04
- [Qemu-devel] [PATCH v2 1/5] util: add socket_set_fast_reuse function which will replace setting SO_REUSEADDR, Sebastian Ottlik, 2013/09/04
- [Qemu-devel] [PATCH v2 3/5] net: call socket_set_fast_reuse instead of setting SO_REUSEADDR, Sebastian Ottlik, 2013/09/04
- Re: [Qemu-devel] [PATCH v2 0/5] Do not set SO_REUSEADDR on Windows, Sebastian Ottlik, 2013/09/05