aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2021-04-27 01:51:43 -0500
committerRob Landley <rob@landley.net>2021-04-27 01:51:43 -0500
commit4785b7611de7eae714941b2e648ffa85c336108b (patch)
tree06dfa7bb5ccd146d8f495ca62a47e8adaa2bf3e6
parent88ebd0d8150ff983e6a7520dc77cd8b69cf52a25 (diff)
downloadtoybox-4785b7611de7eae714941b2e648ffa85c336108b.tar.gz
Don't send reverse DNS lookups out into the world for something that's
mostly only safe to use behind a firewall or through a VPN these days.
-rw-r--r--toys/pending/telnetd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/pending/telnetd.c b/toys/pending/telnetd.c
index 032104f2..235bd174 100644
--- a/toys/pending/telnetd.c
+++ b/toys/pending/telnetd.c
@@ -162,7 +162,7 @@ static int new_session(int sockfd)
if (TT.fork_pid < 0) perror_exit("fork");
if (getpeername(sockfd, (void *)&sa, &sl)) perror_exit("getpeername");
- if (getnameinfo((void *)&sa, sl, toybuf, sizeof(toybuf), NULL, 0, 0))
+ if (getnameinfo((void *)&sa, sl, toybuf, sizeof(toybuf), NULL, 0, NI_NUMERICHOST))
perror_exit("getnameinfo");
write_issue(tty_name);