Skip to content

Commit

Permalink
Log source of ignored query when local-service is used.
Browse files Browse the repository at this point in the history
Thanks to Dominik Derigs for the initial patch.

Signed-off-by: Your Name <you@example.com>
Signed-off-by: DL6ER <dl6er@dl6er.de>
  • Loading branch information
simonkelley authored and DL6ER committed Jan 12, 2022
1 parent 44611db commit 5850a53
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/dnsmasq/forward.c
Original file line number Diff line number Diff line change
Expand Up @@ -1492,7 +1492,8 @@ void receive_query(struct listener *listen, time_t now)
static int warned = 0;
if (!warned)
{
my_syslog(LOG_WARNING, _("Ignoring query from non-local network"));
prettyprint_addr(&source_addr, daemon->addrbuff);
my_syslog(LOG_WARNING, _("ignoring query from non-local network %s (logged only once)"), daemon->addrbuff);
warned = 1;
}
return;
Expand Down Expand Up @@ -2067,7 +2068,8 @@ unsigned char *tcp_request(int confd, time_t now,
}
if (!addr)
{
my_syslog(LOG_WARNING, _("Ignoring query from non-local network"));
prettyprint_addr(&peer_addr, daemon->addrbuff);
my_syslog(LOG_WARNING, _("ignoring query from non-local network %s"), daemon->addrbuff);
return packet;
}
}
Expand Down

1 comment on commit 5850a53

@pralor-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/lose-connectivity-to-my-network-after-a-certain-number-of-cached-dns-entries/53269/15

Please sign in to comment.