-
-
Notifications
You must be signed in to change notification settings - Fork 197
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
Try to obtain host names from another address of the same device when nothing else is available #879
Conversation
… there is none for the exact address (may happen, e.g., for IPv6 addresses) Signed-off-by: DL6ER <dl6er@dl6er.de>
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: |
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
And that was the trick! Thanks a lot! |
char *__attribute__((malloc)) getDatabaseHostname(const char *ipaddr) | ||
// Get hardware address of device identified by IP address | ||
char *__attribute__((malloc)) getMACfromIP(const char *ipaddr) |
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.
This is not correct, git
screwed up the diff
. I removed the getDatabaseHostname()
function altogether as (almost) the same is done by getNameFromIP()
below.
Confirmed working by @ampfinger The change is much less than shown by GitHub. It's diff-generator messed up the actual change and thought I'd rewritten a lot more. |
Can you do me a favor and force push your latest changes? I'm not all that comfortable merging in things if the diff is displaying incorrect information. |
I don't think this is possible, it is the entire change that is confusing GitHub. The individual commits are fine: It's the entirety of these commits that is causing headaches for GitHub. Just the PR diff is broken. |
Yes, the changes are fine. |
I have updated pihole -up some days ago (maybe two) and so pi-hole core was updated. Debug token is |
Not at all? Are queries still being saved in the database? The |
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
Queries are stored correctly but the network table was 4h old (last seen field on all devices). I apologize for the inconvenience |
No need to apologize and no inconvenience caused. In the end we want Pi-hole to be the best it can, so this definitely was good. One last thing: Are there and results when you run
? |
First: you all do great work! |
Yes :-) |
Three times this week I got this message.
Is this related to this? Otherwise I will open a new issue. |
@ampfinger It's unclear if this PR is the cause.
This likely means that there was an error (before this line!) with the database which is why the handle was closed prematurely. Are there any other database-related messages before this one? Your tricorder log does not show any errors, I guess you did it after restarting? |
Yes I did it afterwards. Listening on Unix socket Thats the log until error posted before |
Ping me when you confirm that this PR isn't the issue cause. Thanks! |
Okay I found the issue, was one of my old scripts not correctly uncommented and which had not correctly unlocked db. Sorry, my fault. |
Thanks for finding that it wasn't me who broke the code. However, I see some need here to improve on the error messages. SQLite3 isn't always straight helpful with their texts. @ampfinger Can you still reproduce the error locally? If so, please add
to the file
This will result in a lot more details being shown in the log, hopefully this can tell us why the database connection pointer was invalid at that time. |
I will set the settings and hope to reproduce it! |
Actually this bug cant be reproduced at the moment. It didnt raise the last days. |
@dschaper you asked for a ping when this PR is ready. |
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/pi-hole-core-web-v5-2-and-ftl-v5-3-released/40909/1 |
By submitting this pull request, I confirm the following:
How familiar are you with the codebase?:
10
Try to obtain host names from another address of the same device when there is none for the exact address (may happen, e.g., for IPv6 addresses). This is currently broken in
development
due to names having moved into thenetwork_addresses
table.This fixes a bug mentioned on Discourse (see link below).