summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-bus.c
AgeCommit message (Collapse)Author
2015-08-24resolved: remove duplicate handling of "no servers" query resultLennart Poettering
So far we handled immediate "no server" query results differently from "no server" results we ran into during operation: the former would cause the dns_query_go() call to fail with ESRCH, the later would result in the query completion callback to be called. Remove the duplicate codepaths, by always going through the completion callback. This allows us to remove quite a number of lines for handling the ESRCH. This commit should not alter behaviour at all.
2015-08-21resolved: when passing RRs across the bus, make sure not to use name compressionLennart Poettering
We explicitly need to turn off name compression when marshalling or demarshalling RRs for bus transfer, since they otherwise refer to packet offsets that reference packets that are not transmitted themselves.
2015-08-21resolved: rework synthesizing logicLennart Poettering
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.
2015-06-10resolve: move dns routines into sharedNick Owens
2015-04-29tree-wide: get rid of a few more explicit bus parametersLennart Poettering
2015-04-29sd-bus: drop bus parameter from message callback prototypeLennart Poettering
This should simplify the prototype a bit. The bus parameter is redundant in most cases, and in the few where it matters it can be derived from the message via sd_bus_message_get_bus().
2015-02-23resolved: use == for comparing unsigned against zeroZbigniew Jędrzejewski-Szmek
2015-02-03util: rework strappenda(), and rename it strjoina()Lennart Poettering
After all it is now much more like strjoin() than strappend(). At the same time, add support for NULL sentinels, even if they are normally not necessary.
2014-12-10sd-bus: move common errors src/shared/bus-errors.h → ↵Lennart Poettering
src/libsystemd/sd-bus/bus-common-errors.h Stuff in src/shared/ should not use stuff from src/libsystemd/ really.
2014-11-28treewide: yet more log_*_errno + return simplificationsMichal Schmidt
Using: find . -name '*.[ch]' | while read f; do perl -i.mmm -e \ 'local $/; local $_=<>; s/(if\s*\([^\n]+\))\s*{\n(\s*)(log_[a-z_]*_errno\(\s*([->a-zA-Z_]+)\s*,[^;]+);\s*return\s+\g4;\s+}/\1\n\2return \3;/msg; print;' $f done And a couple of manual whitespace fixups.
2014-11-28treewide: no need to negate errno for log_*_errno()Michal Schmidt
It corrrectly handles both positive and negative errno values.
2014-11-28treewide: auto-convert the simple cases to log_*_errno()Michal Schmidt
As a followup to 086891e5c1 "log: add an "error" parameter to all low-level logging calls and intrdouce log_error_errno() as log calls that take error numbers", use sed to convert the simple cases to use the new macros: find . -name '*.[ch]' | xargs sed -r -i -e \ 's/log_(debug|info|notice|warning|error|emergency)\("(.*)%s"(.*), strerror\(-([a-zA-Z_]+)\)\);/log_\1_errno(-\4, "\2%m"\3);/' Multi-line log_*() invocations are not covered. And we also should add log_unit_*_errno().
2014-08-14resolved: allow passing on which protocol, family and interface to look ↵Lennart Poettering
something up Also, return on which protocol/family/interface we found something.
2014-08-11resolved: verify all RRs when we come back from suspendLennart Poettering
2014-08-11resolved: destroy outstanding queries if the clients that initiated them dieLennart Poettering
2014-08-11resolved: properly pass aborted transaction result back to clientsLennart Poettering
2014-08-03resolved: remove unused variablesThomas Hindoe Paaboel Andersen
2014-08-01resolved: rename resolved.h to resolved-manager.hLennart Poettering
After all it pretty much exlcusively containers definitions about the "Manager" object, hence let's call this the most obvious way.
2014-07-31resolved: accept UTF-8 hostnames from bus clientsLennart Poettering
2014-07-31resolved: implement LLMNR uniqueness verificationLennart Poettering
2014-07-30resolved: add API for resolving specific RRsLennart Poettering
2014-07-30resolved: properly pass empty answers back to bus clientsLennart Poettering
2014-07-23resolved: rework logic so that we can share transactions between queries of ↵Lennart Poettering
different clients
2014-07-18resolved: fix bus signatures to follow family as int changeLennart Poettering
2014-07-18change type for address family to "int"Lennart Poettering
Let's settle on a single type for all address family values, even if UNIX is very inconsitent on the precise type otherwise. Given that socket() is the primary entrypoint for the sockets API, and that uses "int", and "int" is relatively simple and generic, we settle on "int" for this.
2014-07-17resolved: silence warningsThomas Hindoe Paaboel Andersen
No need to write to r here since it will be overwritten as the first step in parse_fail.
2014-07-17resolved: remove unused variableThomas Hindoe Paaboel Andersen
2014-07-17resolved: add DNS cacheLennart Poettering
2014-07-16resolved: properly pass canonical name information to resolving clientLennart Poettering
Also, hook up nss-resolve to make use of this information
2014-07-16resolved: add CNAME lookup supportLennart Poettering
2014-07-16resolved: support for TCP DNS queriesLennart Poettering
2014-07-16dns-domain: introduce macros for accessing all DNS header fieldsLennart Poettering
2014-07-16resolved: add small NSS module that uses resolved to resolve DNS namesLennart Poettering
2014-07-16resolve: add distinct bus error code for hosts that exist but lack A or AAAA ↵Lennart Poettering
records
2014-07-16resolved: add a DNS client stub resolverLennart Poettering
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)