> Le 3 janv. 2018 à 18:59, Florian Balmer <florian.bal...@gmail.com> a écrit : > > Re: Fossil with IPv6 support on Windows XP > > I have several physical and virtual XP machines around, and `fossil > ui' doesn't work any more with the new patch.
> Le 3 janv. 2018 à 19:26, Marcelo Huerta <marcelo.hue...@gmail.com> a écrit : > > I can add that starting with 21d5038f, for "fossil server", localhost access > without login stops working even when the --localauth is passed on invocation, > at least in my Windows 7 installation. > > I use this to access all my local repos without login so I reverted to > 6b5cfc86. Which I offered for discussion in my post "Fossil with IPv6 support on Windows XP" yesterday. ## Additional fix (seeing today's reports) You will have to do two things. First, from a command prompt on Windows XP (>=SP1), type: ipv6 install And second, use code from or above [723dedac] fossil's trunk *and* apply this additional patch: Index: src/winhttp.c ================================================================== --- src/winhttp.c +++ src/winhttp.c @@ -376,11 +376,11 @@ #endif if( WSAStartup(MAKEWORD(2,0), &wd) ){ fossil_fatal("unable to initialize winsock"); } if( flags & HTTP_SERVER_LOCALHOST ){ - zIpAddr = "127.0.0.1"; + zIpAddr = "::1"; } while( iPort<=mxPort ){ DWORD ipv6only = 0; s = socket(AF_INET6, SOCK_STREAM, 0); if( s==INVALID_SOCKET ){ Merely replacing "127.0.0.1" with "::1". ## Why? On modern Windows versions, IPv6 is configured by default and often preferred by the system when attempting outgoing connections as soon as DNS reports both AAAA and A records. When enumerating IPs associated with a name, Fossil tries each IP in sequence until it finds one which connects. If the fossil server you try to reach has IPv6 addresses published in DNS, chances are those will be tried first, even though there are IPv4 addresses also listed. This leads to *long* pauses (about 10 to 20 seconds for each such try) when Fossil server is based on code *before* [76c7a9a7], just because fossil server/ui simply did not accepted IPv6 connections, but only IPv4 connections. This is why IPv6 support has been added to fossil server/ui on Windows. That is a *good* thing anyway because if the OS support or can support IPv6 it shouldn't be ignored by any application. To implement IPv6 server/ui support there are two paths. Either listen on two sockets: one IPv4 *and* one IPv6. Or listen to a single dual-stack socket. That path was chosen because this is the usual proper way to do it, at least on Windows, but I'm rather confident, on unixes too. Also this is the path of least structural change to existing code. A dual-stack socket on Windows is primarily an IPv6 socket which can also accept IPv4 traffic. To this effect, IPv6 (the standard, not a Windowsish thing this time) do provide the special range of IPv6 addresses ::FFFF:w.x.y.z to represent IPv4 addresses mapped to IPv6 address-space (we're not talking tunneling of any sort here). That is just a reserved range, just for that purpose, within the enormous IPv6 address-space. There is a caveat (on Windows XP). On Windows XP, IPv6 is not pre-installed. You need at least SP1 to have support for IPv6, but it isn't anyway configured by default. There is a convenient system utility named "ipv6" on Windows XP that serves as the way to configure IPv6 settings which aren't accessible through any GUI component. So first thing first, you need to add IPv6 support by running the command-line: ipv6 install Takes 5 seconds, and as incredible as it may be, doesn't require a reboot. But there is one additional caveat, which the above patch treats. Windows XP does support IPv6 (as above) and IPv4, but falls short supporting dual-stack sockets because it doesn't recognise or support in any way those IPv4 addresses mapped to IPv6. So ::ffff:127.0.0.1 which is the way to define IPv4 127.0.0.1 in IPv6 way is not understood at all by the system. The above minimalist patch does instruct Windows to listen on the pure IPv6 "localhost" which is ::1, instead of listening on the pure IPv4 "localhost" which is ::ffff:127.0.0.1 in IPv6 notation. ## What's the effect? On Windows XP, "fossil ui" will work again. It will listen to ::1 (IPv6) and launch a browser to connect to "http://localhost", which will get mapped to "::1" and will succeed. On other windows, the situation is unchanged. ## Other paths A probably better way of implementing fossil ui on Windows XP would be to actually listen on two sockets (IPv4 and IPv6 separately). But that is NOT needed on other Windows versions (later than Windows XP at least). I think that with the added above patch, things should get back to normal for Windows XP users, provided they agree to run once and for all "ipv6 install" to add IPv6 protocol support to their system. Open for discussion, of course, but please first test with [723dedac] along the above one line change patch. On my Windows XP test VM which happen to be XP Professional SP3, it works and looks just fine (provided you have installed some other browser than the stock IE of course). Depending on return from people, I will happily spend more time offering our community a more complex / complete solution, that wouldn't impact in any way Windows XP users, including retiring the need to add IPv6 protocol. Though I think that is probably not needed. -- Best Regards, Meilleures salutations, Met vriendelijke groeten, Olivier Mascia _______________________________________________ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users