Bug 704604 - Telnet command in uninterruptable error loop with specious -b
Summary: Telnet command in uninterruptable error loop with specious -b
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: telnet
Version: 14
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Adam Tkac
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 772860 772912
TreeView+ depends on / blocked
 
Reported: 2011-05-13 18:05 UTC by tlhackque
Modified: 2013-04-30 23:49 UTC (History)
2 users (show)

Fixed In Version: telnet-0.17-51.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 772860 (view as bug list)
Environment:
Last Closed: 2011-07-23 01:56:54 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
proposed patch (829 bytes, patch)
2011-07-11 10:39 UTC, Vitezslav Cizek
no flags Details | Diff
Patch matching sources (852 bytes, patch)
2011-07-11 12:29 UTC, tlhackque
no flags Details | Diff

Description tlhackque 2011-05-13 18:05:48 UTC
Description of problem:

Telnet command loops printing

sleep(5) from telnet, after select

if -b is specified for an unavailable interface.

In this state, the escape char is not recognized, and INT (^C) doesn't work either.

The only out is to kill the process from another window.

Telnet should exit after printing the "Cannot assign requested address" error.

Version-Release number of selected component (if applicable):

This is fedora 14 - up to date as of 7-May-11 - I can't find a version number for the telnet command (with -v, --version, or help from an escape.)  Perhaps that should also be addreses.

How reproducible:


Steps to Reproduce:
1. telnet -b validhost.not.local.interface valid.remote.host 25
2.
3.
  
Actual results:

#  telnet -b posted.example.net hormel.ieee.org 25
Trying 140.98.193.224...
posted.example.net: Cannot assign requested address
No connection.
Escape character is '^]'.
SetSockOpt: Bad file descriptor
sleep(5) from telnet, after select
sleep(5) from telnet, after select
^Csleep(5) from telnet, after select
^]sleep(5) from telnet, after select

^]sleep(5) from telnet, after select
qsleep(5) from telnet, after select
^Csleep(5) from telnet, after select
^Csleep(5) from telnet, after select
^Csleep(5) from telnet, after select
^Csleep(5) from telnet, after select
^Csleep(5) from telnet, after select
^Csleep(5) from telnet, after select
^Csleep(5) from telnet, after select
^Zsleep(5) from telnet, after select
sleep(5) from telnet, after select
sleep(5) from telnet, after select
sleep(5) from telnet, after select
sleep(5) from telnet, after select
sleep(5) from telnet, after select
Terminated


Expected results:

#  telnet -b posted.example.net hormel.ieee.org 25
Trying 140.98.193.224...
posted.example.net: Cannot assign requested address
#


Additional info:

Comment 1 Vitezslav Cizek 2011-07-11 10:39:38 UTC
Created attachment 512176 [details]
proposed patch

Hi, try this patch ported from openbsd.

Comment 2 tlhackque 2011-07-11 12:26:46 UTC
(In reply to comment #1)
> Created attachment 512176 [details]
> proposed patch
> Hi, try this patch ported from openbsd.

That patch doesn't match the sources in: ftp://ftp.muug.mb.ca/mirror/fedora/linux/releases/14/Fedora/source/SRPMS/telnet-0.17-47.fc14.src.rpm

I reworked and will attach version that does.  This does fix the bug.  Thanks.

# ./BUILD/netkit-telnet-0.17/telnet/telnet  -b posted.example.net hormel.ieee.org 25
Trying 140.98.193.224...
Couldn't bind to posted.example.net
posted.example.net: Cannot assign requested address
# echo $?
1

Comment 3 tlhackque 2011-07-11 12:29:39 UTC
Created attachment 512199 [details]
Patch matching sources

This version of the proposed patch matches the sources at 

ftp://ftp.muug.mb.ca/mirror/fedora/linux/releases/14/Fedora/source/SRPMS/telnet-0.17-47.fc14.src.rpm

It does resolve the problem.

If this is not the correct location for the telnet source (note it does match the version), please advise.

Thanks.

Comment 4 Fedora Update System 2011-07-13 11:07:15 UTC
telnet-0.17-51.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/telnet-0.17-51.fc15

Comment 5 Fedora Update System 2011-07-13 11:07:28 UTC
telnet-0.17-51.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/telnet-0.17-51.fc14

Comment 6 Fedora Update System 2011-07-13 19:26:08 UTC
Package telnet-0.17-51.fc14:
* should fix your issue,
* was pushed to the Fedora 14 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing telnet-0.17-51.fc14'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/telnet-0.17-51.fc14
then log in and leave karma (feedback).

Comment 7 tlhackque 2011-07-15 01:17:09 UTC
tested: works, added +karma

Thanks again.

Comment 8 Fedora Update System 2011-07-23 01:56:44 UTC
telnet-0.17-51.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2011-07-23 02:03:04 UTC
telnet-0.17-51.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.