Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F112067156
D2875.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
645 B
Referenced Files
None
Subscribers
None
D2875.diff
View Options
Index: usr.sbin/bhyve/dbgport.c
===================================================================
--- usr.sbin/bhyve/dbgport.c
+++ usr.sbin/bhyve/dbgport.c
@@ -116,6 +116,8 @@
void
init_dbgport(int sport)
{
+ int reuse;
+
conn_fd = -1;
if ((listen_fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
@@ -128,6 +130,13 @@
sin.sin_addr.s_addr = htonl(INADDR_ANY);
sin.sin_port = htons(sport);
+ reuse = 1;
+ if (setsockopt(listen_fd, SOL_SOCKET, SO_REUSEADDR, &reuse,
+ sizeof(reuse)) < 0) {
+ perror("setsockopt");
+ exit(1);
+ }
+
if (bind(listen_fd, (struct sockaddr *)&sin, sizeof(sin)) < 0) {
perror("bind");
exit(1);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 13, 8:44 AM (18 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17132787
Default Alt Text
D2875.diff (645 B)
Attached To
Mode
D2875: support SO_REUSEADDR for debug port for bhyve
Attached
Detach File
Event Timeline
Log In to Comment