Re: wget and ipv6 (1.6 beta5) serious bugs
On Wednesday 15 of October 2003 12:11, Thomas Lussnig wrote: Ok this is clear, but than why become the aplication an binary IPv6 enabled one if the PC have no IPv6 support ? Because I'm using packages provided by Linux distribution which needs ipv6 because some users are using it. I thought the configure script checked if the pc have IPv6 support. and yes both of the sugested workarounds would do it. Checking at configure time if host on which I'm compiling does support socket(AF_INET6, ...) is stupid. It should only check if it's able to use getaddrinfo(), genameinfo() and so on while the code should be written in family independent way. I always can compile on one host and use it on a other. Also in future there will be way to unload ipv6 module from Linux kernel. What then? But there are two problems with them. 1. If you try to create an IPv6 socket only to check the IPv6 support i think this is like try and error that is not one of the best choice. Yes, best choice is to write app in family independent way. 2. DNS can support IPv6 even if the OS is not IPv6 aware. So the use of the DNS and try thorugh is also try and error, wich is acceptable since it is defined that you can try the next Adress if one does not work. But it does not check the return value. What I wrote was pseudo code not real code - only to show the idea. Of course errors should be checked and if error res-ai_next != NULL then try ai_next. So it retry each time if one version work or not. There is also AI_ADDRCONFIG option which causes that getaddrinfo() returns only these families which are supported by the system. 3. The major problem is that on such IPv4 only system. Even the parser should complain about an unsupported Adress in the url if there an IPv6 is specified. No. On such system connection to ipv6 host is not possible and that is what should be in error message. ,,Familly not supported'' and try ai-next then. The keyword for ipv6 things is ,,family independent'' rather than ,,ipv6 ready''. Cu Thomas -- Arkadiusz MikiewiczCS at FoE, Wroclaw University of Technology arekm.pld-linux.org AM2-6BONE, 1024/3DB19BBD, arekm(at)ircnet, PLD/Linux
wget and ipv6 (1.6 beta5) serious bugs
Hi, Right now wget code looks like this: #ifdef ENABLE_IPV6 int ip_default_family = AF_INET6; #else int ip_default_family = AF_INET; #endif and then ./connect.c: sock = socket (ip_default_family, SOCK_STREAM, 0); This assumes that binary compiled with ipv6 support is always used on IPv6 capable host which is not true in many, many cases. Such binary on ipv4 only host will cause: [EMAIL PROTECTED] src]$ LC_ALL=C ./wget wp.pl --21:48:37-- http://wp.pl/ = `index.html' Resolving wp.pl... 212.77.100.101 Connecting to wp.pl[212.77.100.101]:80... failed: Address family not supported by protocol. Retrying. --21:48:38-- http://wp.pl/ (try: 2) = `index.html' Connecting to wp.pl[212.77.100.101]:80... failed: Address family not supported by protocol. Retrying. --21:48:40-- http://wp.pl/ (try: 3) = `index.html' Connecting to wp.pl[212.77.100.101]:80... failed: Address family not supported by protocol. Retrying. Applications that use getaddrinfo() shouldn't even bother to know which family they use. Just should do getaddrinfo(host, ..., res0); for (res = res0; res; res=res-ai_next) { s = socket(res-ai_family, res-ai_socktype, res-ai_protocol) if (s0) continue if ((connect(s, res-ai_addr, res-ai_addrlen) 0 ) { close(s) continue) } break } This pseudo-code should show the idea. The best thing IMO is to use getaddrinfo for resolving + struct addrinfo (linked list) for storing data about host.x.y.com. For systems without getaddrinfo ipv4 only replacements should be provided - see openssh portable how it's done there. The whole idea of getaddrinfo/getnameinfo is to get family independent functions. They even work for AF_UNIX on some systems (like on linux+glibc). Anyway for now workaround is something like this in main(): #ifdef ENABLE_IPV6 s = socket(AF_INET6, SOCK_STREAM, 0); if (s 0 (errno == EAFNOSUPPORT)) ip_default_family = AF_INET; close(s); #endif -- Arkadiusz MikiewiczCS at FoE, Wroclaw University of Technology arekm.pld-linux.org AM2-6BONE, 1024/3DB19BBD, arekm(at)ircnet, PLD/Linux
Re: some wget patches against beta3
On Tuesday 07 of October 2003 12:08, Hrvoje Niksic wrote: Thanks! btw. looking into test4 I see that autoconf conception is used in weird way. Normally aclocal.m4 is autogenerated by aclocal command (and it includes sources of macros from /usr/share/autoconf/autoconf/*.m4 and from local acinclude.m4). You are seem to put all macros (even local macros!) inside of aclocal.m4. This is bad because it doesn't allow to regenerate autoconf/aclocal stuff in case when it's needed. aclocal command will overwrite aclocal.m4 and all local macros will be lost. We at PLD are right now patching wget to move all local macros into acinclude.m4 but it would be better if that was done properly at wget maintainers level :) ps. I see that beta5 is there so time to look into this one... argh, same things as in test4 -- Arkadiusz MikiewiczCS at FoE, Wroclaw University of Technology arekm.pld-linux.org AM2-6BONE, 1024/3DB19BBD, arekm(at)ircnet, PLD/Linux
some wget patches against beta3
Hi, Here is few patches against test3: http://cvs.pld-linux.org/cgi-bin/cvsweb/SOURCES/wget-ac.patch?rev=1.4 (some autoconf 2.5x things) http://cvs.pld-linux.org/cgi-bin/cvsweb/SOURCES/wget-pl.patch?rev=1.3 (Polish translation update) -- Arkadiusz MikiewiczCS at FoE, Wroclaw University of Technology arekm.pld-linux.org AM2-6BONE, 1024/3DB19BBD, arekm(at)ircnet, PLD/Linux
Re: Polish translation for wget 1.6
Hello, I updated Polish translation for wget 1.6. I noticed, that previous file had all polish characters changed to '?'. I don't know the reason of that. Maybe because of some conversion of gettext. Anyway, please put this new file in Your distribution. It's already fixed in CVS. Grzegorz Kowal [[EMAIL PROTECTED]] -- Arkadiusz Mikiewicz, AM2-6BONE[ PLD GNU/Linux IPv6 ] http://www.t17.ds.pwr.wroc.pl/~misiek/ipv6/ [ enabled ]