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)
Mon, Feb 10, 12:36 PM
Unknown Object (File)
Feb 8 2025, 7:47 PM
Unknown Object (File)
Jan 23 2025, 9:41 PM
Unknown Object (File)
Dec 5 2024, 3:29 PM
Unknown Object (File)
Sep 24 2024, 4:57 AM
Unknown Object (File)
Sep 22 2024, 10:33 PM
Unknown Object (File)
Sep 22 2024, 5:47 PM
Unknown Object (File)
Sep 22 2024, 5:47 PM
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..