[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#172962: IPv6 support



Package: xfree86
Version: 4.2.1-4; reported 2002-12-13
Severity: wishlist
Tags: sid patch


Hi Branden,
	here is the link where you can download the set of patches to
include IPv6 support for XFree86. I have placed a link for the simple
reason that a couple of them are quite big (yeah let's save some space
on the BTS and waste it with comments :-) ).

http://debdev.fabbione.net/x11_patches/

This patch set has been actually tagged as r0.5.
Patches should be applied, all and in the same sequence as provided,
against XFree86 4.2.1-4. If the actual way of handling the diffs
if it is not the best available please just tell me which way is
usually preferred. Im of course open for suggestions and improvments.

Except from patch 990 and 998 I wrote all the others myself. A lot of
testing has been done to avoid all sort of problems, but still feedbacks
about them are more than welcome. Specially for the 993 and the 998
(see below) a review could be a good idea (preferably out of the BTS,
if it is ok for you). The patches are known to compile and work on 5 archs
(i386/alpha/hppa/powerpc/mips) but we did not have others available for
testing. Of course I will maintain them during the time as much as i will
be able to. I didn't put any license on my patches and the kame license
looks ok to me (it is included in the patch).

The documentation has been updated by Pierfrancesco Caci <pf@tippete.net>
(patch 998)

In order to provide a sane package other files were modified in debian/
directory, but the ones relevant for inclusion are:

debian/local/xserverrc

to change the default from -nolisten tcp to -nolisten tcp,tcp6
(see comments about patch 991)

debian/README

to officially assign 10 slots for ipv6 patches

debian/README.kame

that contains the the kame patch license (probably a copyright.kame
can fits better debian policies).


Patches description:

* 990_debian_ipv6_kame_patch.diff

Basically this is the kame patch
(ftp.kame.net/pub/misc/XFree86-4.2.99.1-v6-20021008.diff.gz) rediffed
against the debian source tree to avoid a few annoying
"Applied with #n line offset" and there were no rejection of any kind.
The patch itself touches the code in few points:

xc/config/cf/X11.tmpl                to add -DINET6 to ConnectionFlags

xc/config/cf/linux.cf                same as above

xc/include/X.h                       to define FamilyInternet6

xc/lib/X11/ConnDis.c                 few bytes to define which protocol
                                     should be used first, default IPv6
				     than IPv4 (Bool tcp46 = False).

xc/lib/xtrans/Xtrans.c               definition for Socket*6 Functions

xc/lib/xtrans/Xtranssock.c           all the Socket*6 funcionts are in
                                     here. There are only few bit of code
				     that are really modified. All the
				     others are plain additions.

xc/lib/xtrans/Xtransutil.c           few bit of code added to support
                                     IPv6 dns resolution.

xc/programs/Xserver/os/access.c      definition of FamilyInternet6 and
                                     a few bits to check IPv6 addresses.

xc/programs/Xserver/os/connection.c  IPv6 support for WellKnownConnetion
                                     used to initialize the protocols that
			             the server will enable/listen on.

xc/programs/xhost/Imakefile          adds $(SOCK_DEFINES)

xc/programs/xhost/xhost.c            several bit of codes due to the facts
                                     that most of the xclients implement
                                     their own way to handle networking
                                     operations (ex. xauth and xdm)


* 991_debian_ipv6_multi_nolisten.diff

The normal X server cannot exclude, from being initialized, more than one
protocol at a time. This patch permits a user to specify a list of
comma separated protocols so that for ex. -nolisten tcp,tcp6 will work.
This solution has been preferred against others to avoid to alter too much
in the original code that will make the patch more complex to maintain
during the time.

The patch touches:

xc/programs/Xserver/os/connection.c   few bits to implement a loop over
                                      protNoListen string to parse for
				      commas and give the result to
				      _XSERVTransNoListen(proto)

xc/programs/Xserver/os/utils.c        only the cmd line help string


* 992_debian_ipv6_getaddrinfo_fix.diff

This is a simple hack that applies only to linux and permits to the IPv6
resolver to understand IPv4 replies from the DNS. It avoids a warning
when using IPv4 and it does not break anything.

The patch touch:

xc/lib/xtrans/Xtranssock.c            a simple s/AF_INET6/NULL/g inside
                                      the kame patch itself and only specif
				      to linux.


* 993_debian_ipv6_sanity_proto_check.diff

This patch implements some sane defaults in case -nolisten is NOT specified
at X server startup or it is specified with missing values. These checks
are required due to the different behaviour of bind() in linux and bsd.
An ipv6 bind() in a plain linux will be able to handle at the same time ipv4
and ipv6 while on bsd it will only handle ipv6 (separate binding). It
actually takes care of linux and hurd (other can be added very easily but i
didn't get any feedback, BSD does not need any change). For hurd it simply
disables IPv6 since it is not supported. For linux it is a bit more complex.
There are 3 different scenarios according to which kernel a user is running
and they can be detected at run time.

1) Linux kernel.
2) Linux kernel + usagi patch working as a plain Linux.
3) Linux kernel + usagi patch working as a BSD kernel.

According to the kernel it will take appropriate actions, the information
gathered by the patch (via /proc) are actually printed out in the X log
file. The patch NEVER overrides the user setting.

IMPORTANT: The default settings should be reviewed and they reflect what I
believe to be sane. (probably I shouldn't write it :-) )

The changes to the original code are minimal and it adds a couple of
functions at the end of the file to make it easy to maintain.

The patch touch:

xc/programs/Xserver/os/connection.c


* 994_debian_ipv6_xhost_-n.diff

This patch implements -n flag to xhost to enable numeric printout of
addresses as well a better output for IPv6 addresses. It removes the
warning print in case of a dns timeout, that will make the output of
xhost easily parsable by other scripts.

The patch touch:

xc/programs/xhost/xhost.c     few pieces of code have been changed


* 995_debian_ipv6_xhost_v4v6mapp.diff

This patch implements support for IPv4 mapped in IPv6 addresses and
solve a problem (atleast on linux) where in certain situations
IPv4 connections are handled as IPv6 onces. I have actually limited
this piece of code to linux only but modifications for other systems
are farly simple. The default is to add/remove ipv4 mapped in ipv6
addresses at the same time when an ipv4 address is processed.
Of course users are allowed to add or remove them manually.

The patch touch:

xc/programs/xhost/xhost.c 


* 998_debian_ipv6_manpages_20021208.diff

Quite self explanatory. It would be nice to know if they are easily
understandable and so on.

The patch touches:

xc/doc/man/general/X.man
xc/programs/Xserver/Xserver.man
xc/programs/xhost/xhost.man


Regards
Fabio

-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux trider-g7 2.4.19 #3 Tue Oct 8 19:33:41 CEST 2002 i686
Locale: LANG=C, LC_CTYPE=C





Reply to: