Hi all
I have rewritten the patch for inetutils 1.5 that assignes a problem
only on x86_64 machines:
http://www.teddy.ch/patches/inetutils-1.5-inet_addr_fix-1.patch
This should be interesting for all they are using CLFS, because without
the fix
telnet localhost
results in
Trying 255.255.255.255
instead of
Trying 127.0.0.1
Regards
Teddy
Submitted By: Teddy <teddy at teddy dot ch>
Date: 2007-04-27
Initial Package Version: 1.5
Upstream Status: Unknown
Origin: Idea taken from patch for version 1.4.2, written by Jim Gifford <jim at
linuxfromscratch dot org>
Description: Updates to use newer GLIBC standards
diff -Naur inetutils-1.5.orig/ftp/ftp.c inetutils-1.5/ftp/ftp.c
--- inetutils-1.5.orig/ftp/ftp.c 2006-10-12 01:23:17.000000000 +0200
+++ inetutils-1.5/ftp/ftp.c 2007-04-27 17:15:10.000000000 +0200
@@ -119,8 +119,7 @@
static char hostnamebuf[80];
memset((char *)&hisctladdr, 0, sizeof (hisctladdr));
- hisctladdr.sin_addr.s_addr = inet_addr(host);
- if (hisctladdr.sin_addr.s_addr != -1) {
+ if (inet_aton(host, &hisctladdr.sin_addr) != 0) {
hisctladdr.sin_family = AF_INET;
strncpy(hostnamebuf, host, sizeof(hostnamebuf));
} else {
diff -Naur inetutils-1.5.orig/telnet/commands.c inetutils-1.5/telnet/commands.c
--- inetutils-1.5.orig/telnet/commands.c 2006-10-11 23:46:26.000000000
+0200
+++ inetutils-1.5/telnet/commands.c 2007-04-27 17:08:38.000000000 +0200
@@ -2398,9 +2398,7 @@
freeaddrinfo (result);
#else /* !IPV6 */
- temp = inet_addr (hostp);
- if (temp != (in_addr_t) -1)
- {
+ if(inet_aton(hostp, &sin.sin_addr) != 0) {
sin.sin_addr.s_addr = temp;
sin.sin_family = AF_INET;
}
diff -Naur inetutils-1.5.orig/tftp/main.c inetutils-1.5/tftp/main.c
--- inetutils-1.5.orig/tftp/main.c 2006-10-12 01:42:52.000000000 +0200
+++ inetutils-1.5/tftp/main.c 2007-04-27 17:14:06.000000000 +0200
@@ -267,9 +267,7 @@
case RESOLVE_NOT_RESOLVED:
peeraddr.sin_family = AF_INET;
- peeraddr.sin_addr.s_addr = inet_addr (argv[1]);
- if (peeraddr.sin_addr.s_addr == -1)
- {
+ if (inet_aton(argv[1], &peeraddr.sin_addr) == 0) {
connected = 0;
printf ("%s: unknown host\n", argv[1]);
return;
--
http://linuxfromscratch.org/mailman/listinfo/patches
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page