+ /*
+ * It's possible that the hostname provided
+ * by the client isn't valid. Retry with a
+ * a hostname reverse-mapped from the client's
+ * address (if provided) and stash this name
+ * in the host entry so that we can identify it
+ * with this name later when we ask statd to
+ * unmonitor it.
+ */
+ if (saddr)
+ hp = gethostbyaddr((char *) &sin->sin_addr,
+ sizeof(sin->sin_addr), AF_INET);
+ if (hp != NULL && strcmp(nhp->name, hp->h_name) != 0) {
+ debuglog("Statd retry with '%s'\n", hp->h_name);
+ smon.mon_id.mon_name = hp->h_name;
+ nhp->revname = strdup(hp->h_name);
+ if (nhp->revname == NULL) {
+ debuglog("No memory for revname\n");
+ free(nhp->name);
+ free(nhp);
+ return;
+ }
+ retrying = 1;
+ goto retry;
+ }