Skip to content

Commit

Permalink
bhyve: change a default address from ANY to localhost
Browse files Browse the repository at this point in the history
Discussed with:     grehan, jhb
  • Loading branch information
oshogbo committed Aug 21, 2021
1 parent 2cdff99 commit 3a92927
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions usr.sbin/bhyve/gdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1840,11 +1840,7 @@ init_gdb(struct vmctx *_ctx)

saddr = get_config_value("gdb.address");
if (saddr == NULL) {
#if defined(INET)
saddr = "0.0.0.0";
#elif defined(INET6)
saddr = "[::]";
#endif
saddr = "localhost";
}

debug("==> starting on %s:%s, %swaiting\n",
Expand All @@ -1860,7 +1856,7 @@ init_gdb(struct vmctx *_ctx)
memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
hints.ai_flags = AI_NUMERICHOST | AI_NUMERICSERV | AI_PASSIVE;
hints.ai_flags = AI_NUMERICSERV | AI_PASSIVE;

if (getaddrinfo(saddr, sport, &hints, &gdbaddr) != 0)
err(1, "gdb address resolve");
Expand Down

0 comments on commit 3a92927

Please sign in to comment.