Fix return values in the sm_notify_1 service routine to return an answer

most of the time (unless fork fails).  This should fix the problem where
FreeBSD won't respond to a remote host and therefor the remote hosts
tries indefinitely to contact the FreeBSD hosts thereby irritating the
system administrator.

PR: misc/27810
This commit is contained in:
Alfred Perlstein 2002-07-11 17:39:50 +00:00
parent 51c8727aa7
commit a2015ce534
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=99791

View File

@ -374,16 +374,16 @@ void *sm_notify_1_svc(stat_chge *arg, struct svc_req *req)
{
/* Never heard of this host - why is it notifying us? */
syslog(LOG_ERR, "Unsolicited notification from host %s", arg->mon_name);
return;
return (&dummy);
}
lp = hp->monList;
if (!lp) return (FALSE); /* We know this host, but have no */
if (!lp) return (&dummy); /* We know this host, but have no */
/* outstanding requests. */
pid = fork();
if (pid == -1)
{
syslog(LOG_ERR, "Unable to fork notify process - %s", strerror(errno));
return;
return (NULL); /* no answer, the client will retry */
}
if (pid) return (&dummy); /* Parent returns */