Warn about non-local queries once only for UDP.

This commit is contained in:
Simon Kelley
2014-03-12 20:12:56 +00:00
parent f00690f93e
commit 0c8584eabc

View File

@@ -1107,7 +1107,12 @@ void receive_query(struct listener *listen, time_t now)
} }
if (!addr) if (!addr)
{ {
my_syslog(LOG_WARNING, _("Ignoring query from non-local network")); static int warned = 0;
if (!warned)
{
my_syslog(LOG_WARNING, _("Ignoring query from non-local network"));
warned = 1;
}
return; return;
} }
} }