From 4785b7611de7eae714941b2e648ffa85c336108b Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Tue, 27 Apr 2021 01:51:43 -0500 Subject: 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. --- toys/pending/telnetd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.3