Date: Sat, 8 Jun 2002 01:07:10 +0800 From: Sergey Zorin <sergey@cc.tpu.edu.ru> To: freebsd-stable@freebsd.org Subject: the -U option of telnetd does not work Message-ID: <31-1516819371.20020608010710@cc.tpu.edu.ru>
next in thread | raw e-mail | index | archive | help
Hi,
When telnetd starts with -U option it does not refuse connection from
addresses not resolved back to name, i.e. this option does not work.
It seems that problem is in realhostname_sa function of libutil.
Following patch is sufficient to fix this problem:
(applied from src/lib/libutil)
--- realhostname.c.orig Sat Jul 28 22:24:46 2001
+++ realhostname.c Fri Jun 7 19:28:41 2002
@@ -118,7 +118,7 @@
#endif
error = getnameinfo(addr, addrlen, buf, sizeof(buf), NULL, 0,
- NI_WITHSCOPEID);
+ NI_WITHSCOPEID|NI_NAMEREQD);
if (error == 0) {
struct addrinfo hints, *res, *ores;
struct sockaddr *sa;
--
Best regards,
Sergey mailto:sergey@cc.tpu.edu.ru
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?31-1516819371.20020608010710>
