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

rec: Allow both A and AAAA when importing /etc/hosts #12203

Merged
merged 3 commits into from Dec 8, 2022

Conversation

sspans
Copy link
Contributor

@sspans sspans commented Nov 16, 2022

This seems to do something right at least - or it might be flaming garbage.

This is my pathetic attempt at adding support for multiple addresses for entries from /etc/hosts.

Short description

Fixes #11690

Checklist

I have:

  • read the CONTRIBUTING.md document
  • compiled this code
  • tested this code - lightly
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)
  • checked that this code was merged to master

@omoerbeek
Copy link
Member

Thanks, I hope to look into this soon

@omoerbeek omoerbeek added this to the rec-4.9.0 milestone Nov 28, 2022
@omoerbeek omoerbeek self-assigned this Nov 29, 2022
@omoerbeek omoerbeek changed the title Update reczones-helpers.cc rec: Allow both A and AAAA when imporint /etc/hosts Nov 30, 2022
@omoerbeek omoerbeek changed the title rec: Allow both A and AAAA when imporint /etc/hosts rec: Allow both A and AAAA when importing /etc/hosts Nov 30, 2022
@omoerbeek
Copy link
Member

omoerbeek commented Nov 30, 2022

Need to fix/extend the unit tests

@omoerbeek omoerbeek marked this pull request as draft November 30, 2022 19:28
@omoerbeek omoerbeek marked this pull request as ready for review December 6, 2022 13:09
@omoerbeek
Copy link
Member

@sspans Can you test the current version? Thanks!

@sspans
Copy link
Contributor Author

sspans commented Dec 6, 2022

Yes - this works as far as I can tell. Tested with 4.8.0 beta2 + this diff.

Only oddity I noticed is that the any queries are not 100% reliable, but I'm fairly certain that's unrelated to this diff.

root@gw:~/bla# grep wireless\.home  /etc/powerdns/recursor.hosts
192.168.1.100               homebridge.home.sp5.nl wireless.home.sp5.nl
2001:1c02:21d:1101::100     homebridge.home.sp5.nl wireless.home.sp5.nl

root@gw:~/bla# dig @::1 -p 5300 ANY homebridge.home.sp5.nl +noall +answer
homebridge.home.sp5.nl.	86213	IN	SOA	localhost. root. 1 604800 86400 2419200 604800
homebridge.home.sp5.nl.	86213	IN	AAAA	2001:1c02:21d:1101::100
homebridge.home.sp5.nl.	86213	IN	NS	localhost.
homebridge.home.sp5.nl.	86213	IN	A	192.168.1.100

root@gw:~/bla# dig @::1 -p 5300 ANY wireless.home.sp5.nl +noall +answer
wireless.home.sp5.nl.	86193	IN	A	192.168.1.100
wireless.home.sp5.nl.	86193	IN	AAAA	2001:1c02:21d:1101::100
wireless.home.sp5.nl.	86193	IN	SOA	localhost. root. 1 604800 86400 2419200 604800
wireless.home.sp5.nl.	86193	IN	NS	localhost.

root@gw:~/bla# dig @::1 -p 5300 -x 192.168.1.100  +noall +answer
100.1.168.192.in-addr.arpa. 86400 IN	PTR	homebridge.home.sp5.nl.
root@gw:~/bla# dig @::1 -p 5300 -x      2001:1c02:21d:1101::100  +noall +answer
0.0.1.0.0.0.0.0.0.0.0.0.0.0.0.0.1.0.1.1.d.1.2.0.2.0.c.1.1.0.0.2.ip6.arpa. 86400	IN PTR homebridge.home.sp5.nl.

@omoerbeek
Copy link
Member

omoerbeek commented Dec 7, 2022

Only oddity I noticed is that the any queries are not 100% reliable, but I'm fairly certain that's unrelated to this diff.

ANY queries rely on what happens to be cached. So they depend on query history , TTLs and cache eviction policy.

As there was an update after your test, could you retest? Thanks!

@sspans
Copy link
Contributor Author

sspans commented Dec 7, 2022

No functional changes for me, everything still works.
Do note that I'm not a user of the search-domain bits.

@omoerbeek
Copy link
Member

Investigating test failure, I probably committed the wrong version of the test.

@omoerbeek
Copy link
Member

omoerbeek commented Dec 8, 2022

Something fishy is going on with the workflows. Last CI run is using 16d51b6 while the force push updated to 1362a82. Also results of workflow run are missing below.

sspans and others added 3 commits December 8, 2022 09:51
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.

Fix forward mapping when loading entries from an etc-hosts file
4 participants