b26fa1a2fbcfee7d03b0c8fd15ec3aa64ae70b9f |
|
10-Feb-2016 |
Daniel Mack <daniel@zonque.org> |
tree-wide: remove Emacs lines from all files
This should be handled fine now by .dir-locals.el, so need to carry that
stuff in every file. |
1f133e0d538305edfce55198abadaa9a32ab23ab |
|
07-Feb-2016 |
Torstein Husebø <torstein@huseboe.net> |
treewide: fix typos and spacing |
a43a068a30f7a47aba39f8b48d5db0c4d39fd21d |
|
29-Jan-2016 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
resolved: add macro to compare sized fields
For consistency, generic.size is renamed to generic.data_size.
nsec3.next_hashed_name comparison was missing a size check. |
fc8eec10f6a95a7ebb0f88954b49f2ed731c3a15 |
|
29-Jan-2016 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
resolved: calculate and print tags for DNSKEY records |
99e5ca6d8bf140444a15c0588fe797b27da5538c |
|
29-Jan-2016 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
resolved: expand flags field in DNSKEY records |
cfb90da3dc579e2f9408bc0e04a71c82dd28ac71 |
|
29-Jan-2016 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
resolved: convert TLSA fields to string
Example output:
_443._tcp.fedoraproject.org IN TLSA 0 0 1 GUAL5bejH7czkXcAeJ0vCiRxwMnVBsDlBMBsFtfLF8A=
-- Cert. usage: CA constraint
-- Selector: Full Certificate
-- Matching type: SHA-256 |
d93a16b81f8baa0e6a16310b210f225129347322 |
|
29-Jan-2016 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
resolved: OPENPGPKEY records |
48d45d2b49d2adb870cd5f1bc7cb389b33655f1c |
|
29-Jan-2016 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
resolved: TLSA records |
d7671a3efdaef690b4316a03011038f731f2eea9 |
|
29-Jan-2016 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
resolved: add alignment to base64
We try to fit the lengthy key data into available space. If the other
fields take less than half of the available columns, we use align everything
in the remaining columns. Otherwise, we put everything after a newline,
indented with 8 spaces.
This is similar to dig and other tools do.
$ COLUMNS=78 ./systemd-resolve -t any .
. IN SOA a.root-servers.net nstld.verisign-grs.com 2016012701 1800 900 604800 86400
. IN RRSIG SOA RSASHA256 0 86400 20160206170000 20160127160000 54549
S1uhUoBAReAFi5wH/KczVDgwLb+B9Zp57dSYj9aX4XxBhKuzccIducpg0wWXhjCRAWuzY
fQ/J2anm4+C4BLUTdlytPIemd42SUffQk2WGuuukI8e67nkrNF3WFtoeXQ4OchsyO24t2
rxi682Zo9ViqmXZ+MSsjWKt1jdem4noaY=
. IN NS h.root-servers.net
. IN NS k.root-servers.net
. IN NS e.root-servers.net
. IN NS c.root-servers.net
. IN NS b.root-servers.net
. IN NS g.root-servers.net
. IN NS d.root-servers.net
. IN NS f.root-servers.net
. IN NS i.root-servers.net
. IN NS j.root-servers.net
. IN NS m.root-servers.net
. IN NS a.root-servers.net
. IN NS l.root-servers.net
. IN RRSIG NS RSASHA256 0 518400 20160206170000 20160127160000 54549
rxhmTVKUgs72G3VzL+1JRuD0nGLIrPM+ISfmUx0eYUH5wZD5XMu2X+8PfkAsEQT1dziPs
ac+zK1YZPbNgr3yGI5H/wEbK8S7DmlvO+/I9WKTLp/Zxn3yncvnTOdjFMZxkAqHbjVOm+
BFz7RjQuvCQlEJX4PQBFphgEnkiOnmMdI=
. IN NSEC aaa ( NS SOA RRSIG NSEC DNSKEY )
. IN RRSIG NSEC RSASHA256 0 86400 20160206170000 20160127160000 54549
HY49/nGkUJJP1zLmH33MIKnkNH33jQ7bsAHE9itEjvC4wfAzgq8+Oh9fjYav1R1GDeJ2Z
HOu3Z2uDRif10R8RsmZbxyZXJs7eHui9KcAMot1U4uKCCooC/5GImf+oUDbvaraUCMQRU
D3mUzoa0BGWfxgZEDqZ55raVFT/olEgG8=
. IN DNSKEY 257 3 RSASHA256 AwEAAagAIKlVZrpC6Ia7gEzahOR+9W29euxhJhVVLOyQbSEW0
O8gcCjFFVQUTf6v58fLjwBd0YI0EzrAcQqBGCzh/RStIoO8g0
NfnfL2MTJRkxoXbfDaUeVPQuYEhg37NZWAJQ9VnMVDxP/VHL4
96M/QZxkjf5/Efucp2gaDX6RS6CXpoY68LsvPVjR0ZSwzz1ap
AzvN9dlzEheX7ICJBBtuA6G3LQpzW5hOA2hzCTMjJPJ8LbqF6
dsV6DoBQzgul0sGIcGOYl7OyQdXfZ57relSQageu+ipAdTTJ2
5AsRTAoub8ONGcLmqrAmRLKBP1dfwhYB4N7knNnulqQxA+Uk1
ihz0=
. IN DNSKEY 256 3 RSASHA256 AwEAAbr/RV0stAWYbmKOldjShp4AOQGOyY3ATI1NUpP4X1qBs
6lsXpc+1ABgv6zkg02IktjZrHnmD0HsElu3wqXMrT5KL1W7Sp
mg0Pou9WZ8QttdTKXwrVXrASsaGI2z/pLBSnK8EdzqUrTVxY4
TEGZtxV519isM06CCMihxTn5cfFBF
. IN RRSIG DNSKEY RSASHA256 0 172800 20160204235959 20160121000000 19036
XYewrVdYKRDfZptAATwT+W4zng04riExV36+z04kok09W0RmOtDlQrlrwHLlD2iN/zYpg
EqGgDF5T2xlrQdNpn+PFHhypHM7NQAgLTrwmiw6mGbV0bsZN3rhFxHwW7QVUFAvo9eNVu
INrjm+sArwxq3DnPkmA+3K4ikKD2iiT/jT91VYr9SHFqXXURccLjI+nmaE7m31hXcirX/
r5i3J+B4Fx4415IavSD72r7cmruocnCVjcp+ZAUKeMyW+RwigzevLz3oEcCZ4nrTpGLEj
wFaVePYoP+rfdmfLfTdmkkm4APRJa2My3XOdGFlgNS1pW1pH4az5LapLE2vMO7p1aQ==
-- Information acquired via protocol DNS in 14.4ms.
-- Data is authenticated: no |
f57e3cd5fa709ec0f52531eccba909ac0851927c |
|
17-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: try to reduce number or DnsResourceKeys we keep around by merging them
Quite often we read the same RR key multiple times from the same message. Try to replace them by a single object when
we notice this. Do so again when we add things to the cache.
This should reduce memory consumption a tiny bit. |
ab481675f98d3d3f12e7e48ba6d2159123b9c7bf |
|
17-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: complete NSEC non-existance proofs
This fills in the last few gaps:
- When checking if a domain is non-existing, also check that no wildcard for it exists
- Ensure we don't base "covering" tests on NSEC RRs from a parent zone
- Refuse to accept expanded wildcard NSEC RRs for absence proofs. |
97c67192eadaffe67b803ec5b991a92bb1137d0b |
|
17-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: when validating an RRset, store information about the synthesizing source and zone in each RR
Having this information available is useful when we need to check whether various RRs are suitable for proofs. This
information is stored in the RRs as number of labels to skip from the beginning of the owner name to reach the
synthesizing source/signer. Simple accessor calls are then added to retrieve the signer/source from the RR using this
information.
This also moves validation of a a number of RRSIG parameters into a new call dnssec_rrsig_prepare() that as side-effect
initializes the two numeric values. |
d51155663a0a95659bd8a02a6cba51359ff416db |
|
11-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
shared: make sure foo.bar and foobar result in different domain name hashes
This also introduces a new macro siphash24_compress_byte() which is useful to add a single byte into the hash stream,
and ports one user over to it. |
c9c72065419e6595131a6fe1e663e2184a843f7c |
|
11-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: when validating, first strip revoked trust anchor keys from validated keys list
When validating a transaction we initially collect DNSKEY, DS, SOA RRs
in the "validated_keys" list, that we need for the proofs. This includes
DNSKEY and DS data from our trust anchor database. Quite possibly we
learn that some of these DNSKEY/DS RRs have been revoked between the
time we request and collect those additional RRs and we begin the
validation step. In this case we need to make sure that the respective
DS/DNSKEY RRs are removed again from our list. This patch adds that, and
strips known revoked trust anchor RRs from the validated list before we
begin the actual validation proof, and each time we add more DNSKEY
material to it while we are doing the proof. |
8e54f5d90a6b9dd1ff672fb97ea98de66c49e332 |
|
03-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: add negative trust anchro support, and add trust anchor configuration files
This adds negative trust anchor support and allows reading trust anchor
data from disk, from files
/etc/systemd/dnssec-trust-anchors.d/*.positive and
/etc/systemd/dnssec-trust-anchros.d/*.negative, as well as the matching
counterparts in /usr/lib and /run.
The positive trust anchor files are more or less compatible to normal
DNS zone files containing DNSKEY and DS RRs. The negative trust anchor
files contain only new-line separated hostnames for which to require no
signing.
By default no trust anchor files are installed, in which case the
compiled-in root domain DS RR is used, as before. As soon as at least
one positive root anchor for the root is defined via trust anchor files
this buil-in DS RR is not added though. |
f2af5ea3cbf54998ed41d2d21a3448abb92ca7ff |
|
02-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: only suffix RR key names with a dot if they don't have one yet |
6af47493de0ef2b66d4c3fbcdd4a2e12fec4bfba |
|
29-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: add comments referencing various RFCs to various places |
6f717d0817573a76c3e586eae02793d8b23a0581 |
|
29-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: include GOST in list of DNSSEC algorithms
We don't implement it, and we have no intention to, but at least mention
that it exists.
(This also adds a couple of other algorithms to the algorithm string
list, where these strings were missing previously.) |
ee3d6aff9bd73c1b23e29d1fa1fa6f7a1ef0533b |
|
28-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: use RRSIG expiry and original TTL for cache management
When we verified a signature, fix up the RR's TTL to the original TTL
mentioned in the signature, and store the signature expiry information
in the RR, too. Then, use that when adding RRs to the cache. |
7b50eb2efa122200e39646c19a29abab302f7d24 |
|
26-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: internalize string buffer of dns_resource_record_to_string()
Let's simplify usage and memory management of DnsResourceRecord's
dns_resource_record_to_string() call: cache the formatted string as
part of the object, and return it on subsequent calls, freeing it when
the DnsResourceRecord itself is freed. |
0936416a1cba187dc76903dae73246f4cbddf312 |
|
26-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: when matching SOA RRs, don't eat up errors |
65b200e70d01cb7c513114b602c9b5cf41348f77 |
|
26-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: when matching SOA RRs, honour RR class |
4b548ef382007e40bd8fb3affdce9f843d0d63ac |
|
18-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: move DNS class utilities to dns-type.c and add more helpers
Let's make DNS class helpers more like DNS type helpers, let's move them
from resolved-dns-rr.[ch] into dns-type.[ch].
This also adds two new calls dns_class_is_pseudo() and
dns_class_is_valid_rr() which operate similar to dns_type_is_pseudo()
and dns_type_is_valid_rr() but for classes instead of types.
This should hopefully make handling of DNS classes and DNS types more
alike. |
105e151299dc1208855380be2b22d0db2d66ebc6 |
|
18-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: add support NSEC3 proofs, as well as proofs for domains that are OK to be unsigned
This large patch adds a couple of mechanisms to ensure we get NSEC3 and
proof-of-unsigned support into place. Specifically:
- Each item in an DnsAnswer gets two bit flags now:
DNS_ANSWER_AUTHENTICATED and DNS_ANSWER_CACHEABLE. The former is
necessary since DNS responses might contain signed as well as unsigned
RRsets in one, and we need to remember which ones are signed and which
ones aren't. The latter is necessary, since not we need to keep track
which RRsets may be cached and which ones may not be, even while
manipulating DnsAnswer objects.
- The .n_answer_cachable of DnsTransaction is dropped now (it used to
store how many of the first DnsAnswer entries are cachable), and
replaced by the DNS_ANSWER_CACHABLE flag instead.
- NSEC3 proofs are implemented now (lacking support for the wildcard
part, to be added in a later commit).
- Support for the "AD" bit has been dropped. It's unsafe, and now that
we have end-to-end authentication we don't need it anymore.
- An auxiliary DnsTransaction of a DnsTransactions is now kept around as
least as long as the latter stays around. We no longer remove the
auxiliary DnsTransaction as soon as it completed. THis is necessary,
as we now are interested not only in the RRsets it acquired but also
in its authentication status. |
5d27351f8546530cf779847b0b04b0172c09f9d0 |
|
10-Dec-2015 |
Tom Gundersen <teg@jklm.no> |
resolved: cache - do negative caching only on the canonical name
Apart from dropping redundant information, this fixes an issue
where, due to broken DNS servers, we can only be certain of whether
an apparent NODATA response is in fact an NXDOMAIN response after
explicitly resolving the canonical name. This issue is outlined in
RFC2308. Moreover, by caching NXDOMAIN for an existing name, we
would mistakenly return NXDOMAIN for types which should not be
redirected. I.e., a query for AAAA on test-nx-1.jklm.no correctly
returns NXDOMAIN, but a query for CNAME should return the record
and a query for DNAME should return NODATA.
Note that this means we will not cache an NXDOMAIN response in the
presence of redirection, meaning one redundant roundtrip in case the
name is queried again. |
547973dea7abd6c124ff6c79fe2bbe322a7314ae |
|
10-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: chase DNSKEY/DS RRs when doing look-ups with DNSSEC enabled
This adds initial support for validating RRSIG/DNSKEY/DS chains when
doing lookups. Proof-of-non-existance, or proof-of-unsigned-zones is not
implemented yet.
With this change DnsTransaction objects will generate additional
DnsTransaction objects when looking for DNSKEY or DS RRs to validate an
RRSIG on a response. DnsTransaction objects are thus created for three
reasons now:
1) Because a user asked for something to be resolved, i.e. requested by
a DnsQuery/DnsQueryCandidate object.
2) As result of LLMNR RR probing, requested by a DnsZoneItem.
3) Because another DnsTransaction requires the requested RRs for
validation of its own response.
DnsTransactions are shared between all these users, and are GC
automatically as soon as all of these users don't need a specific
transaction anymore.
To unify the handling of these three reasons for existance for a
DnsTransaction, a new common naming is introduced: each DnsTransaction
now tracks its "owners" via a Set* object named "notify_xyz", containing
all owners to notify on completion.
A new DnsTransaction state is introduced called "VALIDATING" that is
entered after a response has been receieved which needs to be validated,
as long as we are still waiting for the DNSKEY/DS RRs from other
DnsTransactions.
This patch will request the DNSKEY/DS RRs bottom-up, and then validate
them top-down.
Caching of RRs is now only done after verification, so that the cache is
not poisoned with known invalid data.
The "DnsAnswer" object gained a substantial number of new calls, since
we need to add/remove RRs to it dynamically now. |
c52a97b896c914e17ba5be73c0e806455fd9ad4d |
|
10-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: when outputting RRs in text form, append a trailing dot to owner names
After all, that's how this is done in DNS, and is particularly important
if we look a DS/DNSKEY RRs for the root zone itself, where the owner
name would otherwise be shown as completely empty (i.e. missing). |
4d247a6cd3f69acbc5a09e8ac7e4fbb50eaa3228 |
|
10-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: shortcut RR comparisons if pointers match
When iterating through RR lists we frequently end up comparing RRs and
RR keys with themselves, hence att a minor optimization to check ptr
values first, before doing a deep comparison. |
28b9b7640603f88cb49f95609331fa5072715f15 |
|
03-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: rework how we allow allow queries to be dispatched to scopes
Previously, we'd never do any single-label or root domain lookups via
DNS, thus leaving single-label lookups to LLMNR and the search path
logic in order that single-label names don't leak too easily onto the
internet. With this change we open things up a bit, and only prohibit
A/AAAA lookups of single-label/root domains, but allow all other
lookups. This should provide similar protection, but allow us to resolve
DNSKEY+DS RRs for the top-level and root domains.
(This also simplifies handling of the search domain detection, and gets
rid of dns_scope_has_search_domains() in favour of
dns_scope_get_search_domains()). |
1b4f6e79ec51a57003896a0b605fba427b4a98d2 |
|
03-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: optionally, allocate DnsResourceKey objects on the stack
Sometimes when looking up entries in hashmaps indexed by a
DnsResourceKey it is helpful not having to allocate a full
DnsResourceKey dynamically just to use it as search key. Instead,
optionally allow allocation of a DnsResourceKey on the stack. Resource
keys allocated like that of course are subject to other lifetime cycles
than the usual Resource keys, hence initialize the reference counter to
to (unsigned) -1.
While we are at it, remove the prototype for
dns_resource_key_new_dname() which was never implemented. |
8730bccfc59fe507bd3e0a3abcf411b497ac4f0e |
|
03-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: move algorithm/digest definitions into resolved-dns-rr.h
After all, they are for flags and parameters of RRs and already relevant
when dealing with RRs outside of the serialization concept. |
a8812dd7f161a3e459c1730ac92ff2bbc9986ff1 |
|
02-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: add code to generate the wire format for a single RR
This adds dns_resource_record_to_wire_format() that generates the raw
wire-format of a single DnsResourceRecord object, and caches it in the
object, optionally in DNSSEC canonical form. This call is used later to
generate the RR serialization of RRs to verify.
This adds four new fields to DnsResourceRecord objects:
- wire_format points to the buffer with the wire-format version of the
RR
- wire_format_size stores the size of that buffer
- wire_format_rdata_offset specifies the index into the buffer where the
RDATA of the RR begins (i.e. the size of the key part of the RR).
- wire_format_canonical is a boolean that stores whether the cached wire
format is in DNSSEC canonical form or not.
Note that this patch adds a mode where a DnsPacket is allocated on the
stack (instead of on the heap), so that it is cheaper to reuse the
DnsPacket object for generating this wire format. After all we reuse the
DnsPacket object for this, since it comes with all the dynamic memory
management, and serialization calls we need anyway. |
f91dc2400dc33e9a0745ecaaef7489af116dca38 |
|
02-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: store DNSKEY fields flags+protocol as-is
When verifying signatures we need to be able to verify the original
data we got for an RR set, and that means we cannot simply drop flags
bits or consider RRs invalid too eagerly. Hence, instead of parsing the
DNSKEY flags store them as-is. Similar, accept the protocol field as it
is, and don't consider it a parsing error if it is not 3.
Of course, this means that the DNSKEY handling code later on needs to
check explicit for protocol != 3. |
dc477e7385e8ab29efb8fadb72ec994077a105c6 |
|
25-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
dns-domain: simplify dns_name_is_root() and dns_name_is_single_label()
Let's change the return value to bool. If we encounter an error while
parsing, return "false" instead of the actual parsing error, after all
the specified hostname does not qualify for what the function is
supposed to test.
Dealing with the additional error codes was always cumbersome, and
easily misused, like for example in the DHCP code.
Let's also rename the functions from dns_name_root() to
dns_name_is_root(), to indicate that this function checks something and
returns a bool. Similar for dns_name_is_signal_label(). |
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47dd |
|
25-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: fully support DNS search domains
This adds support for searching single-label hostnames in a set of
configured search domains.
A new object DnsQueryCandidate is added that links queries to scopes.
It keeps track of the search domain last used for a query on a specific
link. Whenever a host name was unsuccessfuly resolved on a scope all its
transactions are flushed out and replaced by a new set, with the next
search domain appended.
This also adds a new flag SD_RESOLVED_NO_SEARCH to disable search domain
behaviour. The "systemd-resolve-host" tool is updated to make this
configurable via --search=.
Fixes #1697 |
58db254ade4fb2ef77de68f28c4f13814819f6a1 |
|
24-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: implement client-side DNAME resolution
Most servers apparently always implicitly convert DNAME to CNAME, but
some servers don't, hence implement this properly, as this is required
by edns0. |
2001c80560e3dae69e14fd994d3978c187af48b8 |
|
23-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: accept TXT records with non-UTF8 strings
RFC 6763 is very clear that TXT RRs should allow arbitrary binary
content, hence let's actually accept that. This also means accepting NUL
bytes in the middle of strings. |
b5efdb8af40ea759a1ea584c1bc44ecc81dd00ce |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out allocation calls into alloc-util.[ch] |
e4e73a632524c382139034d4271f53b6089ab4cb |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out hex/dec/oct encoding/decoding into its own file |
07630cea1f3a845c09309f197ac7c4f11edd3b62 |
|
24-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split our string related calls from util.[ch] into its own file string-util.[ch]
There are more than enough calls doing string manipulations to deserve
its own files, hence do something about it.
This patch also sorts the #include blocks of all files that needed to be
updated, according to the sorting suggestions from CODING_STYLE. Since
pretty much every file needs our string manipulation functions this
effectively means that most files have sorted #include blocks now.
Also touches a few unrelated include files. |
b826ab586c9e0a9c0d438a75c28cf3a8ab485929 |
|
05-Oct-2015 |
Tom Gundersen <teg@jklm.no> |
hashmap: refactor hash_func
All our hash functions are based on siphash24(), factor out
siphash_init() and siphash24_finalize() and pass the siphash
state to the hash functions rather than the hash key.
This simplifies the hash functions, and in particular makes
composition simpler as calling siphash24_compress() repeatedly
on separate chunks of input has the same effect as first
concatenating the input and then calling siphash23_compress()
on the result. |
36d9205d669bcdcb04fa730d1f3549a9fc9a9001 |
|
16-Sep-2015 |
Tom Gundersen <teg@jklm.no> |
resolved: rr - introduce dns_resource_key_new_redirect()
Takes a key and CNAME RR and returns the canonical RR of the right
type. Make use of this in dns_question_redirect(). |
7c1ff6ac3d9e3acae1d601d40728cf7ccc9a7730 |
|
16-Sep-2015 |
Tom Gundersen <teg@jklm.no> |
resolved: rr - introduce dns_resource_key_new_cname()
Creates a new CNAME RR key with the same class and name as an existing key. |
78c6a153c47f8d597c827bdcaf8c4e42ac87f738 |
|
21-Aug-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: rework synthesizing logic
With this change we'll now also generate synthesized RRs for the local
LLMNR hostname (first label of system hostname), the local mDNS hostname
(first label of system hostname suffixed with .local), the "gateway"
hostname and all the reverse PTRs. This hence takes over part of what
nss-myhostname already implemented.
Local hostnames resolve to the set of local IP addresses. Since the
addresses are possibly on different interfaces it is necessary to change
the internal DnsAnswer object to track per-RR interface indexes, and to
change the bus API to always return the interface per-address rather than
per-reply. This change also patches the existing clients for resolved
accordingly (nss-resolve + systemd-resolve-host).
This also changes the routing logic for queries slightly: we now ensure
that the local hostname is never resolved via LLMNR, thus making it
trustable on the local system. |
816b4547dac1b052239ad6ee3801c78c691e5cb4 |
|
24-Jul-2015 |
Daniel Mack <daniel@zonque.org> |
resolved: fix DNS_TYPE_ANY vs DNS_CLASS_ANY confusion
Assigning a TPYE enum value to a class variable is certainly wrong.
However, they both have the same value, so the result was correct
nevertheless. |
549c1a2564b56f2bb38f1203d59c747ea15817f3 |
|
23-Jul-2015 |
Tom Gundersen <teg@jklm.no> |
resolved: rr - SSHFP contains the fingerprint, not the key
Rename the field to make this clearer. |
f5430a3ef308f3a102899fcaf7fbece757082f2a |
|
23-Jul-2015 |
Lennart Poettering <lennart@poettering.net> |
resolve: unify memdup() code when parsing RRs
Let's make dns_packet_read_public_key() more generic by renaming it to
dns_packet_read_memdup() (which more accurately describes what it
does...). Then, patch all cases where we memdup() RR data to use this
new call.
This specifically checks for zero-length objects, and handles them
gracefully. It will set zero length payload fields as a result.
Special care should be taken to ensure that any code using this call
can handle the returned allocated field to be NULL if the size is
specified as 0! |
2c1fb4f71206bf970d493294208c5d7597194856 |
|
23-Jul-2015 |
Lennart Poettering <lennart@poettering.net> |
resolve: fix two minor memory leaks
strv_extend() already strdup()s internally, no need to to this twice.
(Also, was missing OOM check...).
Use strv_consume() when we already have a string allocated whose
ownership we want to pass to the strv.
This fixes 50f1e641a93cacfc693b0c3d300bee5df0c8c460. |
cb57dd41595adddb08095298bb1ed258c8ea4877 |
|
16-Jul-2015 |
Tom Gundersen <teg@jklm.no> |
bitmap: use external iterator
Reuse the Iterator object from hashmap.h and expose a similar API.
This allows us to do
{
Iterator i;
unsigned n;
BITMAP_FOREACH(n, b, i) {
Iterator j;
unsigned m;
BITMAP_FOREACH(m, b, j) {
...
}
}
}
without getting confused. Requested by David. |
5d45a8808431987c370706d365fb0cc95cf03d52 |
|
14-Jul-2015 |
Tom Gundersen <teg@jklm.no> |
resolved: rr - add NSEC3 support
Needed for DNSSEC. |
50f1e641a93cacfc693b0c3d300bee5df0c8c460 |
|
14-Jul-2015 |
Tom Gundersen <teg@jklm.no> |
resolved: rr - add NSEC support
Needed for DNSSEC. |
d23a27a964748967e1ad20e86de869a753af555b |
|
14-Jul-2015 |
Tom Gundersen <teg@jklm.no> |
resolved: improve printing of unknown RRs
This implements the recommendations from RFC3597. |
abf126a355e2f2b62b6c51ab3bb37895d1e3eee7 |
|
14-Jul-2015 |
Tom Gundersen <teg@jklm.no> |
resolved: rr - add DS support
Needed for DNSSEC. |
7c6423e19136a7b7b6ef3fe06b94822e582dda27 |
|
14-Jul-2015 |
Tom Gundersen <teg@jklm.no> |
resolved: rr - print formated timestamps in RRSIG |
1bf968f36393666f2c57953b1748e6219c027dee |
|
14-Jul-2015 |
Tom Gundersen <teg@jklm.no> |
resolved: rr - print DNSKEY and RRSIG in base64
As mandated by RFC4034. |
4ad7f2761da661853dcc29d542efb4727abb1101 |
|
10-Jun-2015 |
Nick Owens <nick.owens@coreos.com> |
resolve: move dns routines into shared |
0f84a72e3c0f58d71cff2121e6df1611eaf9c9ea |
|
27-Nov-2014 |
David Herrmann <dh.herrmann@gmail.com> |
resolve: fix NULL deref on strv comparison
A strv might be NULL if it is empty. The txt.strings comparison doesn't
take that into account. Introduce strv_equal() to provide a proper helper
for this and fix resolve to use it.
Thanks to Stanisław Pitucha <viraptor@gmail.com> for reporting this! |
d5099efc47d4e6ac60816b5381a5f607ab03f06e |
|
15-Sep-2014 |
Michal Schmidt <mschmidt@redhat.com> |
hashmap: introduce hash_ops to make struct Hashmap smaller
It is redundant to store 'hash' and 'compare' function pointers in
struct Hashmap separately. The functions always comprise a pair.
Store a single pointer to struct hash_ops instead.
systemd keeps hundreds of hashmaps, so this saves a little bit of
memory. |
03664a62914782dbd8f069bbcf8a0c8ca1df7010 |
|
20-Aug-2014 |
Lukas Nykryn <lnykryn@redhat.com> |
resolved-dns-rr: fix typo
a->rrsig.type_covered != a->rrsig.type_covered" is always false
regardless of the values of its operands because those operands are identical. |
151226ab4bf276d60d51864330a99f886b923697 |
|
04-Aug-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
resolved: RRSIG records |
ff3d6560bead6879a2fed1bf99bfe8273b3723f1 |
|
04-Aug-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
resolved: add identifiers for dnssec algorithms |
8db0d2f5c37e7e8f5bfce016cfdad7947a3ea939 |
|
04-Aug-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
resolved: DNSKEY records |
7263f72499e962b3fd54cdb7c79d49ca72121ede |
|
04-Aug-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
resolve: add more record types and convert to gperf table
We are unlikely to evert support most of them, but we can at least
display the types properly.
The list is taken from the IANA list.
The table of number->name mappings is converted to a switch
statement. gcc does a nice job of optimizing lookup (when optimization
is enabled).
systemd-resolve-host -t is now case insensitive. |
23432a1c249b9c513e438bffe9778a7ce2ee74fe |
|
04-Aug-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
resolved: align last rr column |
fd0b4602f6332c3f1660eb208c8f5c719709a009 |
|
31-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: properly compare RRs we cannot parse |
42cc2eebb01056beb7acd3ecfe8e533558237f84 |
|
31-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: properly process SSHFP RRs |
9c92ce6d67f88beb31dd6555d12ae3f632218a39 |
|
31-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: properly process SRV records |
8ac4e9e1e54397f6d1745c2a7a806132418c7da2 |
|
31-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: properly process DNAME RRs |
0dae31d468b1a0e22d98921f7b0dbd92fd217167 |
|
31-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
resolved: LOC records
LOC records have a version field. So far only version 0 has been
published, but if a record with a different version was encountered,
our only recourse is to treat it as an unknown type. This is
implemented with the 'unparseable' flag, which causes the
serialization/deserialization and printing function to cause the
record as a blob. The flag can be used if other packet types cannot be
parsed for whatever reason. |
9de3e3294065e8697ff10130b53f274319cdcf6f |
|
31-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
resolved: SPF records |
2e276efc7b0398a3086629a52970bdd4ab7252f9 |
|
31-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
resolved: TXT records |
946c70944ebdf428ffeb9991a7449edbd4011461 |
|
31-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
resolved: MX records |
2d4c5cbc0ed3ccb09dc086a040088b454c22c644 |
|
30-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: add API for resolving specific RRs |
8bf52d3d17d364438191077d0750b8b80b5dc53a |
|
30-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: include SOA records in LLMNR replies for non-existing RRs to allow negative caching |
623a4c97b9175f95c4b1c6fc34e36c56f1e4ddbf |
|
29-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
resolve: add llmnr responder side for UDP and TCP
Name defending is still missing. |
7e8e0422aeb16f2a09a40546c61df753d10029b6 |
|
23-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: implement negative caching |
faa133f3aa7a18f26563dc5d6b95898cb315c37a |
|
23-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: rework logic so that we can share transactions between queries of different clients |
322345fdb9865ef2477fba8e4bdde0e1183ef505 |
|
17-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: add DNS cache |
74b2466e14a1961bf3ac0e8a60cfaceec705bd59 |
|
16-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: add a DNS client stub resolver
Let's turn resolved into a something truly useful: a fully asynchronous
DNS stub resolver that subscribes to network changes.
(More to come: caching, LLMNR, mDNS/DNS-SD, DNSSEC, IDN, NSS module) |