summaryrefslogtreecommitdiffstats
path: root/utils/statd/callback.c
Commit message (Collapse)AuthorAgeFilesLines
* statd: add IPv6 support in sm_notify_1_svc()Chuck Lever2010-01-151-7/+62
| | | | | | | | | | We have all the pieces in place, so update sm_notify_1_svc() to handle SM_NOTIFY requests sent from IPv6 remotes. This also eliminates a memory leak: the strdup'd memory containing the callers' presentation address was never freed. Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* statd: Introduce statd version of matchhostname()Chuck Lever2010-01-151-3/+2
| | | | | | | | | | | | | | | | | | | | For the near future, statd will support IPv6 but exportfs will not. Thus statd will need a version of matchhostname() that can deal properly with IPv6 remotes. To reduce the risk of breaking exportfs, introduce a separate version of matchhostname() for statd to use while exportfs continues to use the existing AF_INET-only implementation. Note that statd will never send matchhostname() a hostname string containing export wildcards, so is_hostame() is not needed in the statd version of matchhostname(). This saves some computational expense when comparing hostnames. A separate statd-specific implementation of matchhostname() allows some flexibility in the long term, as well. We might want to enrich the matching heuristics of our SM_NOTIFY, for example, or replace them entirely with a heuristic that is not dependent upon DNS. Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
* statd: Replace note() with xlog() in rpc.statdChuck Lever2009-11-241-2/+2
| | | | | | | | | | | To facilitate code sharing between statd and sm-notify (and with other components of nfs-utils), replace sm-notify's nsm_log() with xlog(). Since opt_quiet is used in only a handful of insignificant cases, it is removed. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfs-utils: Provide type-checked version of svc_getcaller()Chuck Lever2009-03-051-3/+6
| | | | | | | | | | | | | TI-RPC's version of the svc_getcaller() macro points to a sockaddr_in6, not a sockaddr_in, though for AF_INET callers, an AF_INET address resides there. To squelch compiler warnings when the TI-RPC version of the svc_req structure is used, add inline helpers with appropriate type casting. Note that tcp_wrappers support only AF_INET addresses for now. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* rpc.statd: Clean up: replace "if (!(foo = rtnl))".Chuck Lever2008-09-261-4/+2
| | | | | | | | | | | | Static code checkers flag this kind of thing because it's easy to confuse with "if (!(foo == rtnl))". In one of these cases, the combination of evaluation and assignment isn't even necessary. While we are in the neighborhood, remove an extra argument to note() that is not called for in the passed-in format string. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* statd - fix some compile warningsNeil Brown2007-04-031-0/+2
|
* statd - use dnsname to ensure correct matching of NOTIFY requests.Neil Brown2007-03-291-4/+7
| | | | | | | | | | | | | | | When lockd asks to monitor a host, we find the FQDN from the DNS and remember that, both internally and in the /var/lib/nfs/sm/* file. When we receive an SM_NOTIFY request, we compare both the mon_name and the source IP address against that DNS name to find a match. If a DNS name is not available, we fall back to the name provided by lockd, which at least is known to map to an IP address via gethostbyname. Signed-off-by: Neil Brown <neilb@suse.de>
* Remove notify functionality from statd in favour of sm-notifyNeil Brown2007-03-201-1/+0
| | | | | statd now execs sm-notify to notify peers and only listens to monitor requests and remote notifications itself.
* Autogen updateneilbrown2005-12-201-1/+3
|
* Rename statd log() to note() to avoid conflict with ISO C.chip2003-08-221-2/+2
|
* Fixed bug preventing callbacks to local lockd.lon2000-10-241-3/+7
|
* Initial revisionhjl1999-10-181-0/+53