Nnrpd's "cant gethostbyaddr" message in INN 2.2.3
Dmitry A. Antipov
antipov at rosnet.ru
Wed Aug 16 05:46:41 UTC 2000
Hello,
what does this syslog entry mean:
Aug 16 09:16:03 news nnrpd[25739]: [ID 515007 news.warning] ? cant
gethostbyaddr 111.22.33.44 Permission denied -- using IP address for
access
I'm looked into nnrpd.c - both gethostbyaddr() and gethostbyname()
called in
Address2Name() doesn't affects errno variable (but affects h_errno
instead).
So may be:
if (!Address2Name(&sin.sin_addr, ClientHost, (int)sizeof ClientHost)) {
(void)strcpy(ClientHost, inet_ntoa(sin.sin_addr));
syslog(L_NOTICE,
"? cant gethostbyaddr %s (%s) -- using IP address for access",
ClientHost, hstrerror (h_errno));
ClientAddr = ClientHost;
ClientIP = inet_addr(ClientHost);
}
instead of
if (!Address2Name(&sin.sin_addr, ClientHost, (int)sizeof ClientHost)) {
(void)strcpy(ClientHost, inet_ntoa(sin.sin_addr));
syslog(L_NOTICE,
"? cant gethostbyaddr %s %m -- using IP address for access",
ClientHost);
ClientAddr = ClientHost;
ClientIP = inet_addr(ClientHost);
}
will be more correct ?
Thanks,
--
Dmitry Antipov <antipov at rosnet.ru>
RosNet JSC (ICQ UIN:70767592)
More information about the inn-workers
mailing list