]> git.proxmox.com Git - qemu.git/commit - net/socket.c
net: call socket_set_fast_reuse instead of setting SO_REUSEADDR
authorSebastian Ottlik <ottlik@fzi.de>
Wed, 2 Oct 2013 10:23:14 +0000 (12:23 +0200)
committerStefan Weil <sw@weilnetz.de>
Wed, 2 Oct 2013 17:20:31 +0000 (19:20 +0200)
commitbcbe92fb080420551125994f3b15c139019da694
tree6d9c945c3cdaf9613465799ce68ecd97ee41ca95
parent6669ca13c39a8515cc634695698d3dea5f39be1c
net: call socket_set_fast_reuse instead of setting SO_REUSEADDR

SO_REUSEADDR should be avoided on Windows but is desired on other operating
systems. So instead of setting it we call socket_set_fast_reuse that will result
in the appropriate behaviour on all operating systems.

An exception to this rule are multicast sockets where it is sensible to have
multiple sockets listen on the same ip and port and we should set SO_REUSEADDR
on windows.

Signed-off-by: Sebastian Ottlik <ottlik@fzi.de>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
net/socket.c