Skip to content

nfs-utils: add IPv6 support for rpc.nfsd (try #4)

Jeff Layton linux-nfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6nfs-utils: don't link libexport.a and libmisc.a to nfsdutils/nfsd/Makefile.am+1 -30 replies
2/6nfs-utils: clean up option parsing in nfsd.cutils/nfsd/nfsd.c+4 -40 replies
3/6nfs-utils: break up nfssvc.c into more individually callable functionssupport/include/nfslib.h support/nfs/nfssvc.c utils/nfsd/nfsd.c+219 -1232 replies
4/6nfs-utils: set IPV6_V6ONLY on nfssvc IPv6 socketssupport/nfs/nfssvc.c+7 -00 replies
5/6nfs-utils: add IPv6 support to nfsdsupport/include/nfs/nfs.h utils/nfsd/nfsd.c+141 -444 replies
6/6nfs-utils: update the nfsd manpageutils/nfsd/nfsd.man+16 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/6] nfs-utils: add IPv6 support for rpc.nfsd (try #4)

This is the fourth attempt at a patchset to add IPv6 support to the rpc.nfsd program. This set is quite a bit different from the earlier ones. The main differences are:

1) it first walks /etc/netconfig to determine the protocols and address families to enable. Then disables any specified by command line options.

2) it uses getaddrinfo to generate sockaddrs for sockets that get passed off to the kernel. This simplifies the code quite a bit and makes for more robust handling of the -H option.

3) converts nfsd to use xlog logging facility. It also adds a --debug option that causes it to log to stderr rather than syslog, and makes it print out all debug messages.

4) in the event that an ipv6-enabled rpc.nfsd is run on a kernel that doesn't have an ipv6-enabled knfsd, the program doesn't log an error message if it's able to start nfsd on an IPv4 socket. This should cut down spurious logging until IPv6 support is more widely available.

There is also a lot of general cleanup and reorganization of the startup logic. Although this patchset is a bit larger than the prior ones, I think the result is a much cleaner set of code.

This set should be bisectable, but I've only really tested the final result. I have tested it on various combinations of build options and with ipv6.ko blacklisted and it seems to work appropriately in all cases.

Jeff Layton (6):
nfs-utils: don't link libexport.a and libmisc.a to nfsd
nfs-utils: clean up option parsing in nfsd.c
nfs-utils: break up nfssvc.c into more individually callable
functions
nfs-utils: set IPV6_V6ONLY on nfssvc IPv6 sockets
nfs-utils: add IPv6 support to nfsd
nfs-utils: update the nfsd manpage

 support/include/nfs/nfs.h |   15 ++-
 support/include/nfslib.h  |    7 +-
 support/nfs/nfssvc.c      |  231 ++++++++++++++++++++++++++++---------------
 utils/nfsd/Makefile.am    |    4 +-
 utils/nfsd/nfsd.c         |  243 +++++++++++++++++++++++++++++++++------------
 utils/nfsd/nfsd.man       |   19 +++-
 6 files changed, 365 insertions(+), 154 deletions(-)