So, got some time for this again.

The good news, the patch will work like expected and even support the
definition of the listening address. Some working examples (changed IPv6
address for reason):

beowulf@:~/fossil$ ./fossil server -P
34cd::ab12:1234:a12b:12ab:1ab2:34cd:3cd4:8889 ../fossil.fossil
beowulf@:~/fossil$ lsof -i | grep fossil
fossil    15912 beowulf    3u  IPv6 714135      0t0  TCP
[34cd::ab12:1234:a12b:12ab:1ab2:34cd:3cd4]:8889 (LISTEN)

beowulf@:~/fossil$ ./fossil server -P 192.168.1.127:8889 ../fossil.fossil
beowulf@:~/fossil$ lsof -i | grep fossil
fossil    15915 beowulf    3u  IPv6 707482      0t0  TCP 192.168.1.127:8889
(LISTEN)

beowulf@:~/fossil$ ./fossil server -P 8889 ../fossil.fossil
beowulf@:~/fossil$ lsof -i | grep fossil
fossil    15918 beowulf    3u  IPv6 715424      0t0  TCP *:8889 (LISTEN)

As you can see, ipv6 addresses are not taken in the url-notation but just
as pure as ipv4 addresses. The code from @drh takes simply the last set of
digits till the last colon in the input-string as port - works good enough,
I think.

Oliver Friedrich <redtalonof+mailingl...@gmail.com> schrieb am Fr., 3. Apr.
2015 um 10:26 Uhr:

> Andy Bradford <amb-sendok-1430621661.lfonacgmnndpbedgo...@bradfords.org>
> schrieb am Fr., 3. Apr. 2015 um 04:54 Uhr:
>
>> Thus said Oliver Friedrich on Thu, 02 Apr 2015 20:56:38 -0000:
>>
>> zIpAddr's  use  isn't very  well  documented  here. Basically,  you  can
>> influence which  IP address ``fossil  server'' will listen on  using the
>> -P|--port command line option. E.g.,
>>
>> fossil server -P 192.168.1.100:8080
>>
>> Will cause Fossil  to listen on 192.168.1.100 only,  whereas the default
>> behavior it to use 0.0.0.0 so any configured IP address on the host will
>> work when connecting to the server.
>>
>> I don't know who is using this form  of -P but perhaps you could make it
>> be able to handle and IPv6 address there instead, so one could invoke it
>> like:
>>
>> fossil server -P deaf::dead:8080
>>
>
> So, the code in the patch does already take an ipv6 address, but it wont
> handle this with a port correctly. For an ipv6 needs to be declared like:
>
> fossil server -P [deaf::dead]:8080 to correctly get the port
> differentiated from the url. I'll will add this to the code next week.
>
> Apart from that, not all systems have that alias in etc/hosts. Ubuntu for
> example has:
> beowulf:~$ sudo cat /etc/hosts
> 127.0.0.1 localhost
>
> # The following lines are desirable for IPv6 capable hosts
> ::1     ip6-localhost ip6-loopback
> fe00::0 ip6-localnet
> ff00::0 ip6-mcastprefix
> ff02::1 ip6-allnodes
> ff02::2 ip6-allrouters
>
> And cause of its widespread usage, I would call ubuntu a sane system.
>
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to