summaryrefslogtreecommitdiffstats
path: root/utils/exportfs/exportfs.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2011-08-29 13:18:25 -0400
committerSteve Dickson <steved@redhat.com>2011-08-29 13:43:27 -0400
commit1f1bca1748018e390f46fe4426899cc6f79b82b0 (patch)
tree1952a5a04e6c39523060ecc8d4978f4b081ed36e /utils/exportfs/exportfs.c
parentd66a9649fdbc75a4bb98e3ee84bf69bd113b739b (diff)
downloadnfs-utils-1f1bca1748018e390f46fe4426899cc6f79b82b0.tar.gz
nfs-utils-1f1bca1748018e390f46fe4426899cc6f79b82b0.tar.xz
nfs-utils-1f1bca1748018e390f46fe4426899cc6f79b82b0.zip
statd: statd_matchhostname() doesn't handle localhost properly
The job of statd_matchhostname() is to work hard at matching two hostnames or presentation IP addresses that may refer to the same host. statd_matchhostname() turns the hostname of the local system into a list of addresses containing only the loopback address. The actual DNS registered address of the system does not appear in that list. Presentation IP addresses, on the other hand, are soundly ignored by the AI_CANONNAME option of getaddrinfo(3). The ai_canonname string that is returned is just the same presentation IP address. And the resulting list of addresses contains just that IP address. So if the DNS registered IP address of the local host is passed in as one argument, and the local hostname is passed as the other argument, statd_matchhostname() whiffs and believes there is no match. To fix this, the logic needs to be smarter about deriving a hostname from an IP address. This appears to cause no end of trouble: monitor records pile up in /var/lib/nfs/sm and sm.bak, notifications are missed, and so on. This has likely been around since commit cbd3a131 "statd: Introduce statd version of matchhostname()" (Jan 14, 2010). Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'utils/exportfs/exportfs.c')
0 files changed, 0 insertions, 0 deletions