Bug 223729

Summary: rpcinfo (and probably rpcbind) do not seem to support IPv6 addresses
Product: Base System Reporter: Jim Pirzyk <pirzyk>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: New ---    
Severity: Affects Some People CC: bz, cem, devin, emaste, fabian
Priority: --- Keywords: ipv6
Version: 11.1-RELEASE   
Hardware: Any   
OS: Any   

Description Jim Pirzyk freebsd_committer freebsd_triage 2017-11-18 09:40:11 UTC
rpcinfo (and probably rpcbind) do not seem to support IPv6 addresses:

pirzyk@amigo:~/svn/puppet
25>rpcinfo -p ::1
rpcinfo: ::1: hostname nor servname provided, or not known
pirzyk@amigo:~/svn/puppet
26>rpcinfo -p 127.0.0.1
   program vers proto   port  service
    100000    4   tcp    111  rpcbind
    100000    3   tcp    111  rpcbind
    100000    2   tcp    111  rpcbind
    100000    4   udp    111  rpcbind
    100000    3   udp    111  rpcbind
    100000    2   udp    111  rpcbind
    100000    4 local    111  rpcbind
    100000    3 local    111  rpcbind
    100000    2 local    111  rpcbind
...

This also fails for non localhost IPv6 addresses.  Seems that inet_addr(3) does not understand IPv6 formatted address.
Comment 1 Conrad Meyer freebsd_committer freebsd_triage 2018-01-30 07:10:07 UTC
I think this is a wider issue than one or two programs.  Some of the libc rpc APIs (including those used by rpcinfo) consume ipv4 sockaddr_in addresses only.
Comment 2 Fabian Wenk 2022-02-06 17:59:20 UTC
This problem still exists with FreeBSD 12.3.

I have a NFS client for which the firewall rules on the NFS server are only open for IPv6. NFS mounts work just fine, but 'rpcinfo -p server' (server name does resolve to an IPv4 + IPv6 address) runs into a timeout with:
rpcinfo: can't contact portmapper: RPC: Remote system error - Operation timed out