Commit Graph

37 Commits

Author SHA1 Message Date
Veres Lajos f131770b14 tree-wide: spelling fixes
https://github.com/vlajos/misspell_fixer

b6fdeb618c
Thanks to Torstein Husebo <torstein@huseboe.net>.
2014-12-30 20:07:04 -05:00
Lennart Poettering 1ccda9b716 resolved: make TXT RR generation and parsing more in-line with RFC 6763, section 6.1
The RFC says to encode an single empty TXT string instead of an empty
TXT array. It also says to treat a zero-length TXT RR as a TXT array
with a single zero-length string.
2014-12-01 03:08:55 +01:00
Stanisław Pitucha 0e3434aeb1 resolve: reject empty TXT records
TXT records should have at least one character, so enforce this.

Before 0f84a72 parser SIGSEGV'd on ->txt.strings being NULL, but
even if this is fixed we should reject invalid TXT records.
2014-11-27 11:07:43 -05:00
Stanisław Pitucha 59aa582137 resolve: set error code on failure
Set the error code in case of incorrect name. This prevents continuing
and failing an assert(name) later on.
2014-11-27 16:40:11 +01:00
Stanisław Pitucha c75dbf9bea resolve: fix redirection loops in compressed RR
Loops in RR compression were only detected for the first entry.
Multiple redirections should be allowed, each one checking for an
infinite loop on its own starting point.
Also update the pointer on each redirection to avoid longer loops of
labels and redirections, in names like:
(start) [len=1] "A", [ptr to start]

(David: rename variable to "jump_barrier" and add reference to RFC)
2014-11-27 16:35:56 +01:00
Tom Gundersen 725ca0e53a resolved: dns-packet - use unaligned read/write helpers 2014-11-01 15:36:29 +01:00
Michal Schmidt d5099efc47 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.
2014-09-15 16:08:50 +02:00
Lennart Poettering a407657425 resolved: implement full LLMNR conflict detection logic 2014-08-11 15:06:22 +02:00
Lennart Poettering 3ef77d0476 resolved: properly check return value of dns_resource_record_equal() 2014-08-11 15:06:22 +02:00
Zbigniew Jędrzejewski-Szmek 151226ab4b resolved: RRSIG records 2014-08-03 22:02:32 -04:00
Zbigniew Jędrzejewski-Szmek ff3d6560be resolved: add identifiers for dnssec algorithms 2014-08-03 22:02:32 -04:00
Zbigniew Jędrzejewski-Szmek 8db0d2f5c3 resolved: DNSKEY records 2014-08-03 22:02:32 -04:00
Lennart Poettering bdf10b5b4d resolved: handle IDNA domains
Make sure we format UTF-8 labels as IDNA when writing them to DNS
packets, and as native UTF-8 when writing them to mDNS or LLMNR packets.

When comparing or processing labels always consider native UTF-8 and
IDNA formats equivalent.
2014-08-01 00:58:12 +02:00
Zbigniew Jędrzejewski-Szmek afbc4f267b resolved: fix serialization of LOC records, check correctness 2014-07-31 17:42:14 -04:00
Lennart Poettering 8581858257 resolved: fix deserialization of UTF8 host names 2014-07-31 19:54:24 +02:00
Lennart Poettering 42cc2eebb0 resolved: properly process SSHFP RRs 2014-07-31 18:41:41 +02:00
Lennart Poettering 9c92ce6d67 resolved: properly process SRV records 2014-07-31 18:23:34 +02:00
Lennart Poettering 6a6fc3df74 resolved: make sure we always initialize r when parsing TXT records 2014-07-31 18:23:34 +02:00
Lennart Poettering 8ac4e9e1e5 resolved: properly process DNAME RRs 2014-07-31 18:02:24 +02:00
Zbigniew Jędrzejewski-Szmek cbd67a86fb resolved: fix multi-record packets with TXTs 2014-07-31 10:45:24 -04:00
Zbigniew Jędrzejewski-Szmek 0dae31d468 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.
2014-07-31 08:56:03 -04:00
Zbigniew Jędrzejewski-Szmek 9de3e32940 resolved: SPF records 2014-07-31 08:56:03 -04:00
Zbigniew Jędrzejewski-Szmek 2e276efc7b resolved: TXT records 2014-07-31 08:56:03 -04:00
Zbigniew Jędrzejewski-Szmek 946c70944e resolved: MX records 2014-07-31 08:56:03 -04:00
Lennart Poettering 351e6342d5 resolved: properly return start index when appending RR to packet 2014-07-30 19:24:13 +02:00
Lennart Poettering 0e2bcd6a17 resolved: don't accept messages with ANY RRs 2014-07-30 02:05:23 +02:00
Lennart Poettering ea917db9e6 resolved: discard more invalid llmnr messages 2014-07-29 20:57:58 +02:00
Lennart Poettering 623a4c97b9 resolve: add llmnr responder side for UDP and TCP
Name defending is still missing.
2014-07-29 20:57:58 +02:00
Lennart Poettering 7e8e0422ae resolved: implement negative caching 2014-07-23 02:00:40 +02:00
Lennart Poettering faa133f3aa resolved: rework logic so that we can share transactions between queries of different clients 2014-07-23 02:00:40 +02:00
Lennart Poettering 1716f6dcf5 resolved: add LLMNR support for looking up names 2014-07-18 12:38:32 +02:00
Lennart Poettering 322345fdb9 resolved: add DNS cache 2014-07-17 19:39:50 +02:00
Lennart Poettering 8ba9fd9cee resolved: add CNAME lookup support 2014-07-16 22:51:50 +02:00
Lennart Poettering c73ce96b56 dns-packet: allow dynamic resizing of DNS packets 2014-07-16 18:04:14 +02:00
Lennart Poettering 3cb10d3a0b dns-domain: introduce macros for accessing all DNS header fields 2014-07-16 18:03:46 +02:00
Zbigniew Jędrzejewski-Szmek 4e0296a943 resolve: avoid use of uninitalized variable 2014-07-15 22:47:03 -04:00
Lennart Poettering 74b2466e14 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)
2014-07-16 00:31:38 +02:00