Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #83054 > unrolled thread

Bug#648635: May be it is out of nfs-utils' control

Started by"WHR" <whr@rivoreo.one>
First post2024-07-17 05:40 +0200
Last post2024-07-17 07:00 +0200
Articles 3 — 1 participant

Back to article view | Back to linux.debian.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Bug#648635: May be it is out of nfs-utils' control "WHR" <whr@rivoreo.one> - 2024-07-17 05:40 +0200
    Bug#648635: May be it is out of nfs-utils' control "WHR" <whr@rivoreo.one> - 2024-07-17 07:00 +0200
    Bug#648635: May be it is out of nfs-utils' control "WHR" <whr@rivoreo.one> - 2024-07-17 07:00 +0200

#83054 — Bug#648635: May be it is out of nfs-utils' control

From"WHR" <whr@rivoreo.one>
Date2024-07-17 05:40 +0200
SubjectBug#648635: May be it is out of nfs-utils' control
Message-ID<J13Gh-2F78-1@gated-at.bofh.it>
I think the bug is in linux, where it didn't provide a way to not create an
IPv6 socket; specifically the /proc/fs/nfsd/portlist interface can only be
to control transport protocol (tcp, udp, rdma) and port number. The underlying
code of this interface is hardcoded to create both IPv4 and IPv6 sockets:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/nfsd/nfsctl.c?h=v6.10#n718

[toc] | [next] | [standalone]


#83055

From"WHR" <whr@rivoreo.one>
Date2024-07-17 07:00 +0200
Message-ID<J14VH-2FS6-5@gated-at.bofh.it>
In reply to#83054
> For later releases, simply set the 'host' directive under '[nfsd]' section.

I mean in the config file /etc/nfs.conf

==========

For later releases, simply set the 'host' directive under '[nfsd]' section in
/etc/nfs.conf.

[toc] | [prev] | [next] | [standalone]


#83056

From"WHR" <whr@rivoreo.one>
Date2024-07-17 07:00 +0200
Message-ID<J14VH-2FS6-7@gated-at.bofh.it>
In reply to#83054
I found a workaround.

By using option '--host' in rpc.nfsd(8), it will creating the socket from user
space, then passing the file descriptor to kernel via /proc/fs/nfsd/portlist;
thus bypasses the previously mentioned socket creation code in kernel.

So to listen on IPv4 only, pass option '--host=0.0.0.0' to rpc.nfsd(8). For
Debian Bullseye and early releases, add this option to 'RPCNFSDOPTS' variable
of file /etc/default/nfs-kernel-server; for example:
	RPCNFSDOPTS="--no-udp --host=0.0.0.0"
For later releases, simply set the 'host' directive under '[nfsd]' section.

Now I have:
	# netstat -nl | grep -F :2049
	tcp        0      0 0.0.0.0:2049            0.0.0.0:*               LISTEN

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.kernel


csiph-web