Bug 232020
Summary: | ipv6 changes break telnetd with no DNS | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Bryn M. Reeves <bmr> | ||||||
Component: | telnet | Assignee: | Adam Tkac <atkac> | ||||||
Status: | CLOSED DUPLICATE | QA Contact: | Ben Levenson <benl> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | 5.0 | CC: | ovasik, tao | ||||||
Target Milestone: | --- | Keywords: | Reopened | ||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2007-09-03 08:49:04 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | |||||||||
Bug Blocks: | 246258 | ||||||||
Attachments: |
|
Description
Bryn M. Reeves
2007-03-13 16:18:17 UTC
Created attachment 149946 [details]
patch correcting two name lookup problems
This addresses the problem for me, in that I can successfully telnet into the
machine with this applied. Also tested with working DNS and didn't hit any
issues.
There are some bits of code that don't totally make sense, for e.g.:
perror("getaddrinfo: localhost");
perror(gai_strerror(e));
exit(1);
Using perror here doesn't seem right - for one thing, errno will have some
random value at this point that needn't have anything to do with the
getaddrinfo we just did.
For e.g., if we just fix the first problem, we're left with confusing error
messages like:
getaddrinfo: localhost: Connection refused
Temporary failure in name resolution: Illegal seek
When the lookup for localhost fails. I'll submit a change for that in a
separate patch.
Created attachment 149948 [details]
clean up error messages in telnetd.c:doit()
Change use of perror to use fprintf and gai_strerror directly.
Errors now looks something like:
getaddrinfo: localhost: Temporary failure in name resolution
The code in this part of telnetd.c still looks a bit odd to me:
gethostname(host_name, sizeof(host_name));
if ((e = getaddrinfo(host_name, NULL, &hints, &res)) != 0) {
if(e != EAI_AGAIN) {
fprintf(stderr, "getaddrinfo: localhost: %s\n",
gai_strerror(e));
exit(1);
}
}
if(res)
freeaddrinfo(res);
Since it only seems to check that we can lookup an address, but doesn't make
any use of the information we retrieved.
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux release. Since this bugzilla is in a component that is not approved for the current release, it has been closed with resolution deferred. You may reopen this bugzilla for consideration in the next release. |