Bull GNU/Linux NFSv4 project

IPv6 support for NFS client

Download page

July 4th, 2005
Aurélien Charbon

Introduction:

This page provides patches and packages allowing the support of NFS (v2, v3 and v4) over IPv6. This includes :

The current kernel patches are over a linux-2.6.12 kernel release on which the CITI's patch and the Chuck Lever's transport switch patches have been applied (see below). For further information see the Chuck Lever release notes
The TI-RPC library and the rpcbind command have been ported from FreeBSD, and are currently provided as standalone packaging. The question of knowing how these new libraries and command could be delivered is open (standalone packaging, included in other packagings,...).

Note Well:


Available patches and packages:

Kernel part:

The current kernel patch set allows the support of IPv6 in the client side. These patches are available either in separate patches or in a cumulative patch.
Please report problems to Aurelien Charbon.

These patches have to be applied over a linux-2.6.12 on which these patches have been applied (in the given order):
- CITI's patches
- Chuck Lever's patches, providing the support of advanced transport technologies

Refer to the Chuck Lever's Release Notes for more information about these patches.

User part:

Last release of TI-RPC
libtirpc-0.1.7.tar.bz2
rpcbind-0.1.4.tar.bz2
Util-linux package (contains NFS client commands) util-linux-2.12-3-01.patch applied over util-linux-2.12 on which the CITI's patch have been applied.

The libtirpc and rpcbind packages provide respectively the TI-RPC library and the rpcbind/rpcinfo commands. To install them, unpack the tar files, and follow the instructions in the INSTALL file.

Separative patchset for the client part:

File linux-2.6.12-01.patch

Change structures and tests depending on the transport in inode.c Change transport-dependant field (sockaddr_in) of structure nfs_server
(sockaddr* + length)

File linux-2.6.12-02.patch

Change the client address in the 'struct nfs4_client' to be transport independent. The type of the 'cl_addr' field is changed from sockaddr_in to sockaddr *.
A 'addrlen' field is added to contain the length of the address.

Adapt the prototypage of the nfs4_find_client() and nfs4_get_client().

File linux-2.6.12-03.patch

Complete the transport dependent functions used to print the addresses
Use rpc_print_peeraddr() to display the address information in NFS.

File linux-2.6.12-04.patch

Change the interface with the mount command for NFSv2 and v3 in order to allow the use of non-IPv4 addresses.
The 'nfs_mount_data' structure is extended with the fields host_addrlen (int) and host_addr (sockaddr *) to carry addresses which may be other than IPv4 addresses. The mount version number is incremented to 7 to assume the compatibility with previous versions. So according to the mount version, the server address will be retrieved from the addr or host_addr field.

Changes related to address field in svc_rqst structure

File linux-2.6.12-05a.patch: Introducing two function: svc_getaddlen and svc_get_port to obtain address length and port of a given sockaddr
File linux-2.6.12-05b.patch: Define new function is_valid_addr two determine if an adress is valid
File linux-2.6.12-05c.patch: Introduce a function to print addresses regardless the transport. Introduce constant MAX_ADDR_BUF which is the max length for an adress buffer. Add addrbuf: address buffer to store all type of addresses
File linux-2.6.12-05d.patch: Changing the rq_addr field of svc_rqst structure to become transport-independant
File linux-2.6.12-05e.patch: Changing the rq_daddr field of svc_rqst structure to become transport-independant
File linux-2.6.12-05f.patch: Changing the addr field from of svc_deferred_req structure to become transport-independant
File linux-2.6.12-05g.patch: Changing the svc_tcp_accept to accept other protocol than IPv4
File linux-2.6.12-05h.patch: Changing pktinfo structure to be transport-independant
File linux-2.6.12-05i.patch: Changing the svc_create_socket_parameter prototype

File linux-2.6.12-06.patch

Adding macros used to manipulate IPv6 addreses (IPv6 mapping, loopback etc.)

File linux-2.6.12-07.patch

Change the callback address in the nfs4_client and nfs4_setclientid structures to be usable by any transport. Adapt the constants for the XDR encoding/decodind

File linux-2.6.11-08.patch

Adding SOCK_PMAP_REG and SOCK_PERM flags
SOCK_PERM flag has been introduced to avoid callback connections to be registered in rpcbind
SOCK_PMAP_REG replaces the pmap_register flag.

Cumulative patch:

File linux-2.6.12-ALL.patch

Tests done:

See the test section


See also:

The page concerning IPv6 support development for NFS server is available here


Page maintained by: Aurelien Charbon
Accessed times since its creation.
 
Last update: 2005, July 08