-
-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add dnsmasq warnings to message table #1243
Conversation
…do not flush the message table on reload (but only on restart) so that config-related (i.e. one-time) warnings are not accidentally deleted. Signed-off-by: DL6ER <[email protected]>
Signed-off-by: DL6ER <[email protected]>
@@ -314,6 +314,19 @@ void my_syslog(int priority, const char *format, ...) | |||
fputc('\n', stderr); | |||
} | |||
|
|||
/* Pi-hole diagnosis system */ | |||
if(priority == LOG_WARNING) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is priority
set? Is this user-configurable? Is this a dnsmasq
option?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We only want to add WARNING
level messages to the message
table here. dnsmasq
logs quite a few things like warnings, but also more generic information like queries. The priority is hard-coded in the dnsmasq
code, some examples:
We want:
Line 955 in a296265
my_syslog(LOG_WARNING, _("warning: interface %s does not currently exist"), if_tmp->name); |
Line 869 in a296265
my_syslog(LOG_WARNING, _("cache size greater than 10000 may cause performance issues, and is unlikely to be useful.")); |
Line 1016 in a296265
my_syslog(MS_TFTP | LOG_WARNING, _("warning: %s inaccessible"), daemon->tftp_prefix); |
Lines 64 to 66 in 198e7c6
my_syslog(MS_DHCP | LOG_WARNING, _("ignoring invalid line in lease database: %s %s %s %s ..."), | |
daemon->dhcp_buff3, daemon->dhcp_buff2, | |
daemon->namebuff, daemon->dhcp_buff); |
We don't want:
Line 862 in a296265
my_syslog(LOG_INFO, _("started, version %s DNS disabled"), VERSION); |
Line 1227 in a296265
my_syslog(LOG_INFO, _("connected to system DBus")); |
Line 207 in 2999e2b
my_syslog(LOG_INFO, _("dumping UDP packet %u mask 0x%04x"), ++packet_count, mask); |
Lines 55 to 58 in db8ee8c
my_syslog(LOG_INFO, _("pool memory in use %zu, max %zu, allocated %zu"), | |
blockdata_count * sizeof(struct blockdata), | |
blockdata_hwm * sizeof(struct blockdata), | |
blockdata_alloced * sizeof(struct blockdata)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woks as intended. See
pi-hole/web#1973 (review)
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/pi-hole-ftl-v5-12-web-v5-9-and-core-v5-7-released/51795/1 |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/pi-hole-ftl-v5-12-web-v5-9-and-core-v5-7-released/51795/3 |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/dnsmasq-warn-reducing-dns-packet-size/51803/2 |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/issue-with-pihole-and-ipv6-error/51802/3 |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/maximum-number-of-concurrent-dns-queries-reached/51804/8 |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/dnsmasq-warn-duplicate-dhcp-option-23/51811/2 |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/long-term-load-15min-avg-larger-than-number-of-processors/51826/2 |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/adminlte-version-is-v5-9-php-socket-0-connection-refused/51839/11 |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/maximum-number-of-concurrent-dns-queries-reached-max-150/51910/7 |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/ignoring-domain-config-domain-for-dhcp-host-name-hostname/52027/4 |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/warning-messages-from-dnsmasq/52034/3 |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/issues-with-pihole-status-after-upgrading/52340/5 |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/dnsmasq-warn-with-vpn-after-update/52451/2 |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/dns-warning-with-latest-update/52465/2 |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/dns-masq-warning-help-needed/52954/2 |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/0-blocking-no-adlists-dns-query-limit-warning-after-update/59978/1 |
By submitting this pull request, I confirm the following:
How familiar are you with the codebase?:
10
Add DNSMASQ_WARN message type whenever dnsmasq logs a warning. Also do not flush the message table on reload (but only on restart) so that config-related (i.e. one-time) warnings are not accidentally deleted.