Skip to content
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

Delay IPv6 client name lookups #2130

Draft
wants to merge 1 commit into
base: development
Choose a base branch
from
Draft

Conversation

DL6ER
Copy link
Member

@DL6ER DL6ER commented Dec 6, 2024

What does this implement/fix?

This PR is an attempt to fix #2124

The described issue is that some IPv6 clients don't show a host name in the Query Log even when the network table has one.

The reason for this is timing. When a client issues a query over IPv6 quickly after it got this address, the first query arrived
the Pi-hole before the client is known to the network table. When FTL now tries to resolve this address's name, it cannot find a name. A few moments later, when the ARP cache is parsed for the next time, FTL may be able to correlate this new address through an identical MAC address to an existing address having a host name. However, as the default value of resolver.refreshNames is IPV4_ONLY, FTL actually never tries to resolve the address so it never gets to know the IPv6 client's host name.

The attempt we are doing here is postponing name resolution of IPv6 clients by two times the ARP processing interval - this should give plenty time for the network table to catch up so that - when the client name is tried to be resolved for the first (and only!) time - we can get it right away.

By default, ARP cache interpretation is run at the database.DBinterval interval.


Related issue or feature (if applicable): #2124

Pull request in docs with documentation (if applicable): N/A


By submitting this pull request, I confirm the following:

  1. I have read and understood the contributors guide, as well as this entire template. I understand which branch to base my commits and Pull Requests against.
  2. I have commented my proposed changes within the code.
  3. I am willing to help maintain this change if there are issues with it later.
  4. It is compatible with the EUPL 1.2 license
  5. I have squashed any insignificant commits. (git rebase)

Checklist:

  • The code change is tested and works locally.
  • I based my code and PRs against the repositories developmental branch.
  • I signed off all commits. Pi-hole enforces the DCO for all contributions
  • I signed all my commits. Pi-hole requires signatures to verify authorship
  • I have read the above and my PR is ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant