git: aa5f7a915250 - stable/13 - bhyve: change a default address from ANY to localhost
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 26 Jan 2023 19:25:43 UTC
The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=aa5f7a9152504d9556e63c89f0b0717ae3e2edec commit aa5f7a9152504d9556e63c89f0b0717ae3e2edec Author: Mariusz Zaborski <oshogbo@FreeBSD.org> AuthorDate: 2021-08-19 18:00:35 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2023-01-26 19:12:26 +0000 bhyve: change a default address from ANY to localhost Discussed with: grehan, jhb (cherry picked from commit 3a92927bb69f2d3fcd3dec4c909aab2191f4b848) --- usr.sbin/bhyve/gdb.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/usr.sbin/bhyve/gdb.c b/usr.sbin/bhyve/gdb.c index 40f226701a1a..94167053629e 100644 --- a/usr.sbin/bhyve/gdb.c +++ b/usr.sbin/bhyve/gdb.c @@ -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", @@ -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");