Page MenuHomeFreeBSD

support SO_REUSEADDR for debug port for bhyve
ClosedPublic

Authored by jmg on Jun 20 2015, 4:21 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 3, 11:49 PM
Unknown Object (File)
Wed, Oct 1, 1:21 AM
Unknown Object (File)
Tue, Sep 30, 6:20 PM
Unknown Object (File)
Tue, Sep 30, 4:24 PM
Unknown Object (File)
Tue, Sep 30, 9:57 AM
Unknown Object (File)
Thu, Sep 18, 12:19 PM
Unknown Object (File)
Thu, Sep 18, 11:57 AM
Unknown Object (File)
Aug 9 2025, 10:10 AM
Subscribers

Details

Reviewers
grehan
neel
Summary

If you shutdown a bhyve instance w/ gdb attached to it, you'll
get a hanging port in TIME_WAIT preventing bind'ing to the same
port... Like all daemons, mark the socket SO_REUSEADDR so we don't
get hit by this issue...

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage

Event Timeline

jmg retitled this revision from to support SO_REUSEADDR for debug port for bhyve.
jmg updated this object.
jmg edited the test plan for this revision. (Show Details)
jmg added reviewers: grehan, neel.
usr.sbin/bhyve/dbgport.c
135

sizeof(reuse) ala style(9) and the code below.

136

perror("setsockopt")

address grehan's comments...

I'll match style, but I prefer to use no parens for vars, this lets
the coder know that sizeof is being used properly, where as w/ parens,
it's a type and a bug (where if the var changes types, you will have
a mismatch)...

grehan edited edge metadata.
This revision is now accepted and ready to land.Jun 20 2015, 5:50 AM

committed in svn commit: r284630 - head/usr.sbin/bhyve

must not of done the review tag properly..