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

Fix virtual interface address determination #1170

Merged
merged 2 commits into from
Sep 24, 2021

Conversation

DL6ER
Copy link
Member

@DL6ER DL6ER commented Sep 18, 2021

By submitting this pull request, I confirm the following:

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.

How familiar are you with the codebase?:

10


This PR ensures we're recognizing virtual interfaces (e.g., eth0:0) as distinct interfaces even when the kernel does not treat the as interfaces with their own interface index. This is necessary to pick the correct local address when determining which address is the right one for replying to A and AAAA queries to pi.hole and <hostname>.

In addition, we fix a small glitch if the interface we received a query on doesn't have the requested address type (e.g. virtual interfaces only configured with one IPv6 but no IPv6 address). Instead of replying with 0.0.0.0 resp. ::, we reply with NODATA which seems more menaingful.

…ived a query on doesn't have the requested address type (e.g. virtual interfaces only configured with one IPv6 but no IPv6 address)

Signed-off-by: DL6ER <[email protected]>
@DL6ER DL6ER added the Bugfix label Sep 18, 2021
@pralor-bot
Copy link

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

https://discourse.pi-hole.net/t/finding-pi-hole-ip-addresses-after-v5-4-update/49712/11

@DL6ER DL6ER requested review from dschaper and PromoFaux September 23, 2021 18:49
@DL6ER DL6ER merged commit 9203a00 into development Sep 24, 2021
@DL6ER DL6ER deleted the tweak/pihole_virtual_interfaces branch September 24, 2021 06:09
@pralor-bot
Copy link

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

https://discourse.pi-hole.net/t/finding-pi-hole-ip-addresses-after-v5-4-update/49712/27

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

Successfully merging this pull request may close these issues.

3 participants