On Sun, Aug 16, 2020 at 10:59:02PM +0200, Martijn van Duren wrote:
> Wanting to try my hands at dpb on alpha I set up an nfs-server since in
> forever. Mounting the share on alpha goes without problems, but trying
> to mount it on my amd64 laptop I trigger the following message on the
> server:
> mountd[19611]: Refused mount RPC from host 192.168.153.197 port 51155
> 
> Looking up the message in mountd.c I see that it's because of the
> following check: sport >= IPPORT_RESERVED
> So somehow my mount command is being generated on a non-reserved port,
> while man mount_nfs say:
>      The -P flag historically informed the kernel to use a reserved port
>      when communicating with clients.  In OpenBSD, a reserved port is
>      always used.
> 
> server$ cat /etc/exports 
> /ports -maproot=root -network=192.168.153.0 -mask=255.255.255.0
> 
> client$ doas mount -t nfs 192.168.153.4:/ports /mnt/
> mount_nfs: bad MNT RPC: RPC: Authentication error; why = Client credential 
> too weak
Just set up NFS the other day between amd64 server and octeon client:

        # sysctl -n kern.version
        OpenBSD 6.7-current (GENERIC.MP) #7: Wed Aug  5 20:18:02 MDT 2020
            [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP

        # cat /etc/exports
        /usr/src -ro -mapall=nobody
        # rcctl -f start portmap mountd nfsd

        ER-4# mount -t nfs           
        ER-4# sysctl -n kern.version 
        OpenBSD 6.7-current (GENERIC.MP) #15: Sun Aug 16 16:30:42 UTC 2020
            [email protected]:/usr/src/sys/arch/octeon/compile/GENERIC.MP

        ER-4# mount -t nfs 10.1.1.14:/usr/src /usr/src
        ER-4# ls /usr/src/                                                      
       
        CVS             distrib         include         sbin            usr.sbin
        ...

Works like charm, I've been building kernels with it.
Note that my amd64 server is on a ten day old snapshot, haven't upgraded
yet.

> Based upon the port-number it does not look like an endianness problem,
> so most likely the source-port isn't being properly bound.
> 
> Is anyone else seeing this? Did I botch something up? Is there an actual
> bug here?
I also just amended your exact export which works fine:

        # cat >>/etc/exports
        /usr/ports -maproot=root -network=10.1.1.0 -mask=255.255.255.0
        ^D
        # kill -HUP `cat /var/run/mountd.pid`

        ER-4# mount -t nfs 10.1.1.14:/usr/ports /usr/ports
        ER-4# ls /usr/ports/                                                    
       
        .cvsignore      bulk            games           meta            
productivity
        ...

> server version:
> OpenBSD 6.7 (GENERIC.MP) #4: Wed Jul 15 11:16:20 MDT 2020
> client version:
> OpenBSD 6.7-current (GENERIC.MP) #26: Fri Aug 14 11:52:30 MDT 2020
You talk about the client's platform and possibly different endianess
but leave the server's platform unmentioned.

Reply via email to