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

Two *.olsr domain name fixes #406

Merged
merged 2 commits into from
Feb 9, 2023
Merged

Two *.olsr domain name fixes #406

merged 2 commits into from
Feb 9, 2023

Conversation

pktpls
Copy link
Contributor

@pktpls pktpls commented Feb 7, 2023

dnsmasq: define .olsr domains independently of OLSRd

Previously, dnsmasq would only pick up our own .olsr domain names
once OLSR had first flushed its nameservice hosts file, and once
dnsmasq actually reloaded its config. This could take up to 5 minutes.
Until then, our own .olsr domains were not resolvable.

We now explicitly tell dnsmasq about our own .olsr domain names.
As a result, they can be resolved instantly once dnsmasq is running.

Neat side effect: proper .olsr hostnames in Reverse DNS and traceroute.
Before this patch, the first hop would only report as 'frei.funk'.

dnsmasq: never forward .olsr queries to public resolvers

Queries for *.olsr should never be forwarded to public resolvers.
Some resolvers drop queries for unknown TLDs, without a response.

As a result, our query waits for a long time and eventually times out.
This affects A queries for unknown hosts, and also all AAAA queries.

Happy Eyeballs means an AAAA query is sent almost always,
even though *.olsr is really only used for our IPv4 networking,
and so we get lots of very slow DNS queries...

This can be avoided very simply by not forwarding .olsr queries.

Queries for *.olsr should never be forwarded to public resolvers.
Some resolvers drop queries for unknown TLDs, without a response.

As a result, our query waits for a long time and eventually times out.
This affects A queries for unknown hosts, and also all AAAA queries.

Happy Eyeballs means an AAAA query is sent almost always,
even though *.olsr is really only used for our IPv4 networking,
and so we get lots of very slow DNS queries...

This can be avoided very simply by not forwarding .olsr queries.
Previously, dnsmasq would only pick up our own .olsr domain names
once OLSR had first flushed its nameservice hosts file, and once
dnsmasq actually reloaded its config. This could take up to 5 minutes.
Until then, our own .olsr domains were not resolvable.

We now explicitly tell dnsmasq about our own .olsr domain names.
As a result, they can be resolved instantly once dnsmasq is running.

Neat side effect: proper .olsr hostnames in Reverse DNS and traceroute.
Before this patch, the first hop would only report as 'frei.funk'.
@@ -13,6 +13,7 @@ config dnsmasq
option noping '{{ dhcp_no_ping|int if dhcp_no_ping is defined else 1 }}'
option quietdhcp '1'
option cachesize '{{ dns_cache_size | default(10000) }}'
list server '/olsr/'
Copy link
Contributor

@PolynomialDivision PolynomialDivision Feb 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain the config syntax? I don't understand why this config option should exclude olsr domains from a lookup.

https://openwrt.org/docs/guide-user/base-system/dhcp

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found it: https://openwrt.org/docs/guide-user/base-system/dhcp_configuration#selective_dns_forwarding

Probably you could also do list server '/olsr/127.0.0.1'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably you could also do list server '/olsr/127.0.0.1'

That might do a loop, /olsr/ simply means that *.olsr lookups are forwarded to a "null server" if we don't already know the answer, i.e. they're not forwarded at all.

Copy link
Contributor Author

@pktpls pktpls Feb 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If OLSRd served a local DNS server on e.g. port 10053 instead of writing files, we could set it to /olsr/127.0.0.1#10053 instead of refreshing files.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If OLSRd served a local DNS server on e.g. port 10053 instead of writing files, we could set it to /olsr/127.0.0.1#10051 instead of refreshing files.

That would probably solve OLSR/olsrd#116 along the way.

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.

4 participants