Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
isIPV4_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:
git rebase
)Checklist:
developmental
branch.