Commit graph

154 commits

Author SHA1 Message Date
Tom Gundersen d1c457badf resolved: fall back to hardcoded ifindex when checking if a link is the loopback
Reported by Philippe De Swert <philippedeswert@gmail.com>.

Coverity CID#1237656
2014-09-13 21:10:59 +02:00
Lennart Poettering c4147df156 resolved: fix typo in log message 2014-08-22 18:10:31 +02:00
David Herrmann 40a1eebde6 shared: add MAXSIZE() and use it in resolved
The MAXSIZE() macro takes two types and returns the size of the larger
one. It is much simpler to use than MAX(sizeof(A), sizeof(B)) and also
avoids any compiler-extensions, unlike CONST_MAX() and MAX() (which are
needed to avoid evaluating arguments more than once). This was suggested
by Daniele Nicolodi <daniele@grinta.net>.

Also make resolved use this macro instead of CONST_MAX(). This enhances
readability quite a bit.
2014-08-22 14:01:05 +02:00
Lennart Poettering af4ec4309e notify: send STOPPING=1 from our daemons 2014-08-21 17:24:21 +02:00
Tom Gundersen a9feff3d77 resolved: write resolv.conf search - switch arguments
Found by Lukáš Nykrýn.
2014-08-20 15:56:18 +02:00
Lennart Poettering be754d5443 resolved: fix which return codes we check
Discovered by Lukas Nykryn
2014-08-20 14:48:18 +02:00
Lukas Nykryn 03664a6291 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.
2014-08-20 14:34:26 +02:00
David Herrmann bf32f99f65 resolve: fix compilation on LLVM+clang
LLVM+clang does not allow statement-expressions inside of
type-declarations (file-scope). Use CONST_MAX() to avoid this.
2014-08-15 16:59:09 +02:00
Lennart Poettering 4de120ee44 resolved: fix assertion when joining llmnr mcast group 2014-08-15 16:42:14 +02:00
Tom Gundersen bda2c408f8 resolved: pull in domain names from sd-network 2014-08-14 23:38:38 +02:00
Lennart Poettering 5ba73e9b64 resolved: clarify that LLMNR scopes must have a link assigned
This is supposed to remove some compiler warnings:

http://lists.freedesktop.org/archives/systemd-devel/2014-July/021393.html
2014-08-14 19:56:22 +02:00
Lennart Poettering db97a66aa6 resolved: enable LLMNR
THis was accidentally broken, as we truned off LLMNR far to frequently,
where we only wanted to turn off LLMNr on IPV6 on kernels lacking
support for it.
2014-08-14 01:01:43 +02:00
Lennart Poettering 51323288fc resolved: allow passing on which protocol, family and interface to look something up
Also, return on which protocol/family/interface we found something.
2014-08-14 01:01:43 +02:00
Tom Gundersen d6731e4c79 sd-network: /_get_link_/_link_get_/
The link is the 'object', so make this in line with our usual naming convention.

Suggested by Kay and Lennart.
2014-08-13 22:37:45 +02:00
Lennart Poettering 90ab504273 resolved: skip IPv6 LLMNR if IPv6 is not available 2014-08-13 15:00:12 +02:00
Lennart Poettering 96e6e39443 resolved: return exit code of event loop 2014-08-12 19:33:09 +02:00
Lennart Poettering 3e684349c2 resolved: unify logic how we flush out DNS servers we learnt 2014-08-12 19:32:55 +02:00
Lennart Poettering 87f5a19343 resolved: filter out duplicate DNS servers when writing resolv.conf 2014-08-12 13:02:27 +02:00
Thomas Hindoe Paaboel Andersen bf1594f54e resolved: initialize counter
introduced in: a407657425
2014-08-12 04:42:33 +02:00
Lennart Poettering 6436165dbc sd-network: rename the per-ifindex calls to sd_network_get_link_xxx()
This way we can introduce system-wide versions of these calls that are
called the same way, but without the "link" in the name.
2014-08-11 22:56:52 +02:00
Lennart Poettering 556a22945f resolved: when picking a new hostname make sure two hosts pick different ones
This way we can avoid always picking the same replacement hostnames when
picking one.
2014-08-11 15:06:22 +02:00
Lennart Poettering 4d91eec42d resolved: actually, the peer with the lower IP address wins conflicts 2014-08-11 15:06:22 +02:00
Lennart Poettering 3ef64445cd resolved: make sure we don't mark the wrong zone RRs conflicting 2014-08-11 15:06:22 +02:00
Lennart Poettering 2fb3034cb2 resolved: be a bit more communicative about conflicts 2014-08-11 15:06:22 +02:00
Lennart Poettering 902bb5d8ab resolved: verify all RRs when we come back from suspend 2014-08-11 15:06:22 +02:00
Lennart Poettering 82bd6dddc4 resolved: destroy outstanding queries if the clients that initiated them die 2014-08-11 15:06:22 +02:00
Lennart Poettering 818f766b12 resolved: properly pass aborted transaction result back to clients 2014-08-11 15:06:22 +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
Lennart Poettering e56187ca4a resolved: don't abort if a transaction is aborted because its scope is removed 2014-08-05 17:02:46 +02:00
Lennart Poettering 6e06847294 resolved: add 100ms initial jitter to all LLMNR requests 2014-08-05 17:02:46 +02:00
Lennart Poettering aea2429d6e resolved: enforce ratelimit on LLMNR traffic 2014-08-05 17:02:46 +02:00
Lennart Poettering 7b85d72f82 resolved: don't consider tentative addresses relevant 2014-08-05 04:18:23 +02:00
Lennart Poettering cc7844e787 resolved: fix a message typo 2014-08-05 04:18:01 +02:00
Lennart Poettering d84b686f06 resolved: stop the prober when we detect a conflict in LLMNR 2014-08-05 04:17:45 +02:00
Lennart Poettering 60eb3f7cf1 resolved: don't override zone item state after starting the probe
After all, the probe might be finished immeidately (due to resources,
...), and we shouldn't then set the state back to probing.
2014-08-05 04:17:12 +02:00
Lennart Poettering 13b551acb6 resolved: when sending fails, don't try connecting to the next DNS server if we actually use LLMNR as protocol 2014-08-05 04:15:45 +02:00
Lennart Poettering dc4d47e2c7 resolved: never reuse transactions for probing that are already completed based on cached data 2014-08-05 01:52:25 +02:00
Lennart Poettering 4d926a69bc resolved: bypass local cache when we issue a transaction for verification purposes 2014-08-05 01:52:24 +02:00
Lennart Poettering cd1b20f90a resolved: if there's already an RR established that has the same name of an RR to be established, skip probing the name
After all, what has been probed once, doesn't need to be probed again.
2014-08-05 01:52:24 +02:00
Lennart Poettering 21d73c87b0 resolved: actually read the initial state data from networkd when we initialize 2014-08-04 23:08:49 +02:00
Lennart Poettering 19b50b5ba7 resolved: read the per-interface LLMNR setting from networkd and act on it 2014-08-04 23:08:03 +02:00
Lennart Poettering f0e1546763 resolved: fix order in which we destroy manager resources 2014-08-04 19:59:05 +02:00
Lennart Poettering edc501d467 resolved: when there's already somebody listening on the LLMNR ports, simple disable LLMNR and warn, but continue
This allows us to run resolved inside an nspawn container that shares
the network namespace with the host, if there's already an instance
running.
2014-08-04 19:48:03 +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
Zbigniew Jędrzejewski-Szmek de292aa1dd resolve-host: make arg_type an int
We are using it also to store _DNS_TYPE_INVALID, so it should be signed.
2014-08-03 22:02:32 -04:00
Zbigniew Jędrzejewski-Szmek 7263f72499 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.
2014-08-03 22:02:32 -04:00
Zbigniew Jędrzejewski-Szmek 23432a1c24 resolved: align last rr column 2014-08-03 21:46:08 -04:00