Page MenuHomeFreeBSD

D2875.diff
No OneTemporary

D2875.diff

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

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)

Event Timeline