Commit Graph
8 Commits
Author SHA1 Message Date
Wez Furlong ec6a7d83c9 dns: use fully qualified name when resolving A/AAAA records
We were so close, yet so far!

closes: https://github.com/KumoCorp/kumomta/issues/49
2023-05-30 09:57:01 -07:00
Wez Furlong dade11ef22 dns: make it easy to detect and react to domain literals in lua
Add an is_domain_literal field to the resolve of kumo.dns.lookup_mx
2023-05-05 10:57:40 -07:00
Wez Furlong bb64d6d2a8 dns: fix IPv4 and IPv6 literal domain resolving
Bypass the actual DNS resolver when handling literal
domains.
2023-04-21 12:17:09 -07:00
Wez Furlong 7f0fd509f1 dns: fix ipv6 lookups
A couple of issues in here:

1. a copypasta incident meant that the v6 lookup was really just a v4
   lookup. doh!
2. We would lookup v4 addresses and just be satisfied with those,
   ignoring any v6 addresses

We now run the v4 and v6 lookups concurrently and merge the results
together.

We do still list the v4 addresses first in the list of addresses.
We don't try to be smart about using the "right" addresses when
work through the list; we try them all until one works out.

Correctly guessing at which one will work means replicating logic
in the kernel, and would potentially be screwed up when we add in
HAProxy support later.
2023-04-04 13:04:16 -07:00
Wez Furlong f0fc5c37f3 handle malformed names better
There are MX records in the wild that return invalid hostnames.
Skip those when considering the set of MX records.
2023-03-15 15:14:58 -07:00
Wez Furlong b43e88985c add kumo.dns.lookup_mx
This function returns MX information, including the computed site_name.
Update the queue example to show how to use it to populate the SITE_OF
map used in that example.

This commit switches to using the `Name` type under the covers to ensure
that we use canonical names for our cache keys.
2023-03-15 09:34:23 -07:00
Wez Furlong e0df3362ca dns-resolver: unit test for A-then-B vs B-then-A ordering 2023-03-12 19:53:23 -07:00
Wez Furlong 31f072978d refactor: move mx resolver into separate crate 2023-03-12 15:00:02 -07:00