telnet/telnet-rh704604.patch
Adam Tkac eab4c80347 - add "-debug6" option to telnetd (#rh674942)
- telnet wasn't interruptable (^C) when started with specious -b argument (#704604)

Signed-off-by: Adam Tkac <atkac@redhat.com>
2011-07-13 12:53:06 +02:00

25 lines
853 B
Diff

--- netkit-telnet-0.17/telnet/commands.c.hostalias 2011-07-11 08:07:22.000000000 -0400
+++ netkit-telnet-0.17/telnet/commands.c 2011-07-11 08:10:12.131039660 -0400
@@ -2400,17 +2400,21 @@
ahints.ai_family = PF_UNSPEC;
ahints.ai_socktype = SOCK_STREAM;
ahints.ai_flags = AI_PASSIVE;
error = getaddrinfo(aliasp, "0", &ahints, &ares);
if (error) {
+ printf ("Couldn't get address for %s\n", aliasp);
warn("%s: %s", aliasp, gai_strerror(error));
close(net);
+ net = -1;
continue;
}
if (bind(net, ares->ai_addr, ares->ai_addrlen) < 0) {
+ printf ("Couldn't bind to %s\n", aliasp);
perror(aliasp);
(void) close(net); /* dump descriptor */
+ net = -1;
freeaddrinfo(ares);
continue;
}
freeaddrinfo(ares);
}