[lug] Restart failure binding to/listening on recently used port

David Ahern dsahern at gmail.com
Sun Oct 11 14:43:39 MDT 2009


I have been using kvm's version of qemu for a couple of years now, and I
am fairly certain it sets the option. If you have the code (the path is
the same for kvm's qemu git or qemu's git), the path is:

vl.c, main() --> vnc_display_open() --> inet_listen()

inet_listen() sets SO_REUSEADDR.

Also, I have restarted VM's very quickly back-to-back (with VNC and
other display options) and never hit this.

Maybe you are hitting another problem.

David


On 10/11/2009 02:23 PM, Chris Riddoch wrote:
> On Sun, Oct 11, 2009 at 1:11 PM, David Ahern <dsahern at gmail.com> wrote:
>> I believe you need to set the SO_REUSEADDR socket option.
> 
> Well, that at least gives me enough to get that script to work, but I
> just threw that together to demonstrate that there *is* a repeatable
> problem...
> 
> The *real* problem, in my current case, is that Qemu's VNC server
> doesn't use SO_REUSEADDR.  And various other programs.  Should I file
> bugs, then?  It looks like there's some security implications, one way
> or another?
> 



More information about the LUG mailing list