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

check domain for trailing dot #51

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Blackyfff
Copy link
Contributor

@Blackyfff Blackyfff commented Jan 25, 2021

having a trailing dot in domainname is a common Copy&Paste error and generates wrong config files

@mweinelt
Copy link
Member

I'm pretty sure trailing dots are fine, do you have an example where this breaks anything?

@Blackyfff
Copy link
Contributor Author

Blackyfff commented Jan 25, 2021

It is related to freifunk/icvpn-meta#615

Following an excerpt from the currently generated unbound config where aachen is missing the local-zone entry for the reverse:

# aachen
domain-insecure: "ffac"
domain-insecure: "5.10.in-addr.arpa."

# altmuehltal
domain-insecure: "ffamt"

# amsterdam
domain-insecure: "020"
domain-insecure: "adm"
domain-insecure: "205.10.in-addr.arpa"
local-zone: "205.10.in-addr.arpa" nodefault

this is caused by:

icvpn-scripts/mkdns

Lines 59 to 66 in 980f100

def add_data(self, domains, servers):
self.zones[self.community] = {'forward': {}, 'reverse': {}}
for domain in domains:
domain = str(domain)
if domain.endswith('ip6.arpa') or domain.endswith('in-addr.arpa'):
self.zones[self.community]['reverse'][domain] = servers
else:
self.zones[self.community]['forward'][domain] = servers

I'm not sure, but here may be the same problem

if domain.endswith('.ip6.arpa') or domain.endswith('.in-addr.arpa'):

@Blackyfff
Copy link
Contributor Author

Ping

@fogti
Copy link

fogti commented Mar 25, 2021

I think it might be a good idea to squash these two commits.

having a trailing dot in domainname is a common Copy&Paste error but generates wrong config files

Signed-off-by: Blackyfff <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants