summaryrefslogtreecommitdiff
path: root/src/resolve
Commit message (Collapse)AuthorAge
* Use space after a silencing (void)Zbigniew Jędrzejewski-Szmek2015-03-13
| | | | | We were using a space more often than not, and this way is codified in CODING_STYLE.
* tree-wide: there is no ENOTSUP on linuxDavid Herrmann2015-03-13
| | | | Replace ENOTSUP by EOPNOTSUPP as this is what linux actually uses.
* Do not advertise .d snippets over main config fileZbigniew Jędrzejewski-Szmek2015-03-03
| | | | | | | | | | For daemons which have a main configuration file, there's little reason for the administrator to use configuration snippets. They are useful for packagers which need to override settings, but we shouldn't advertise that as the main way of configuring those services. https://bugs.freedesktop.org/show_bug.cgi?id=89397
* resolved: use == for comparing unsigned against zeroZbigniew Jędrzejewski-Szmek2015-02-23
|
* remove unused includesThomas Hindoe Paaboel Andersen2015-02-23
| | | | | | This patch removes includes that are not used. The removals were found with include-what-you-use which checks if any of the symbols from a header is in use.
* include <poll.h> instead of <sys/poll.h>Thomas Hindoe Paaboel Andersen2015-02-12
| | | | | | include-what-you-use automatically does this and it makes finding unnecessary harder to spot. The only content of poll.h is a include of sys/poll.h so should be harmless.
* Revert "tree-wide: Always use recvmsg with MSG_CMSG_CLOEXEC"Lennart Poettering2015-02-12
| | | | | | | This reverts commit d6d810fbf8071f8510450dbacd1d083f37603656. It's apparently not OK to pass MSG_CMSG_CLOEXEC to recvmsg() of raw sockets.
* tree-wide: Always use recvmsg with MSG_CMSG_CLOEXECCristian Rodríguez2015-02-10
|
* util: rework strappenda(), and rename it strjoina()Lennart Poettering2015-02-03
| | | | | | 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.
* treewide: fix multiple typosTorstein Husebø2015-01-26
|
* resolved: when rereading /etc/resolv.conf, always start using first DNS ↵Lennart Poettering2015-01-23
| | | | | | | | | | | | | | | | | | | server again Previously we tried to stick to a DNS server as long as it is available. When /etc/resolv.conf changed, and the old DNS server we used was still in there we'd continue to use it, even if it was at the end of the list. With this change we'll now always start with the first DNS server in the list again. Rationale: certain network managing implementations (notably NetworkManager) when connected to a VPN place both the VPN DNS server as well as the local DNS server in /etc/resolv.conf. If we used the local one before we would thus continue to use the local one, making VPN names unresolvable. NetworkManager really should be fixed to only place the VPN DNS servers in the file, but with this commit things are at least similarly bad as they used to be...
* #pragma once here and thereZbigniew Jędrzejewski-Szmek2015-01-23
|
* tests: use assert_se instead of assertRonny Chevalier2015-01-22
| | | | Otherwise they can be optimized away with -DNDEBUG
* tree-wide: spelling fixesVeres Lajos2014-12-30
| | | | | | | https://github.com/vlajos/misspell_fixer https://github.com/torstehu/systemd/commit/b6fdeb618cf2f3ce1645b3315f15f482710c7ffa Thanks to Torstein Husebo <torstein@huseboe.net>.
* tmpfiles: add new line type 'v' for creating btrfs subvolumesLennart Poettering2014-12-28
|
* networkd/resolved: correct spacing near eol in code commentsTorstein Husebø2014-12-11
|
* sd-bus: move common errors src/shared/bus-errors.h → ↵Lennart Poettering2014-12-10
| | | | | | src/libsystemd/sd-bus/bus-common-errors.h Stuff in src/shared/ should not use stuff from src/libsystemd/ really.
* resolved: don't resolve the hostname "gateway" with LLMNR, leave that to ↵Lennart Poettering2014-12-03
| | | | nss-myhostname
* resolved: make TXT RR generation and parsing more in-line with RFC 6763, ↵Lennart Poettering2014-12-01
| | | | | | | | 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.
* resolve: remove unused variableRonny Chevalier2014-11-30
|
* resolved: Support resolved.conf.d directories in the usual search pathsJosh Triplett2014-11-29
|
* treewide: use log_*_errno whenever %m is in the format stringMichal Schmidt2014-11-28
| | | | | | | | | | | If the format string contains %m, clearly errno must have a meaningful value, so we might as well use log_*_errno to have ERRNO= logged. Using: find . -name '*.[ch]' | xargs sed -r -i -e \ 's/log_(debug|info|notice|warning|error|emergency)\((".*%m.*")/log_\1_errno(errno, \2/' Plus some whitespace, linewrap, and indent adjustments.
* treewide: a few more log_*_errno + return simplificationsMichal Schmidt2014-11-28
| | | | The one in tmpfiles.c:create_item() even looks like it fixes a bug.
* treewide: yet more log_*_errno + return simplificationsMichal Schmidt2014-11-28
| | | | | | | | | | | | | 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.
* treewide: no need to negate errno for log_*_errno()Michal Schmidt2014-11-28
| | | | It corrrectly handles both positive and negative errno values.
* treewide: auto-convert the simple cases to log_*_errno()Michal Schmidt2014-11-28
| | | | | | | | | | | | | 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().
* resolve: reject empty TXT recordsStanisław Pitucha2014-11-27
| | | | | | | 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.
* resolve: set error code on failureStanisław Pitucha2014-11-27
| | | | | Set the error code in case of incorrect name. This prevents continuing and failing an assert(name) later on.
* resolve: fix redirection loops in compressed RRStanisław Pitucha2014-11-27
| | | | | | | | | | | 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)
* resolve: fix NULL deref on strv comparisonDavid Herrmann2014-11-27
| | | | | | | | 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!
* resolved: fix typo in sd_notify() callTom Gundersen2014-11-25
|
* resolve: fix CID#1237549 Unchecked return valueSusant Sahani2014-11-17
|
* resolved: dns-packet - use unaligned read/write helpersTom Gundersen2014-11-01
|
* resolve: make DnsScope::conflict_queue an OrderedHashmapMichal Schmidt2014-10-23
| | | | | on_conflict_dispatch() uses hashmap_steal_first() and then does something non-trivial with it. It may care about the order.
* mac: rename apis with mac_{selinux/smack}_ prefixWaLyong Cho2014-10-23
|
* resolved: simplify detection of packets from the loopback deviceLennart Poettering2014-10-22
| | | | | | | We can simplify our code quite a bit if we explicitly check for the ifindex being 1 on Linux as a loopback check. Apparently, this is hardcoded on Linux on the kernel, and effectively exported to userspace via rtnl and such, hence we should be able to rely on it.
* resolve: add missing headerLukasz Skalski2014-10-17
| | | | Change-Id: I64f7c6b446f6d92057c35cc3d4e29bd2bad8f75b
* resolved: apply label to /run/systemd/resolve/resolv.confZbigniew Jędrzejewski-Szmek2014-10-13
| | | | | | | Under an SELinux system, we want the file that is created to have a proper context, different from the default for files in /run. This is so that the policy can give access to almost everyone to this file.
* resolved: split out writing of resolv.confZbigniew Jędrzejewski-Szmek2014-10-13
| | | | manager_write_resolv_conf() is quite long anyway.
* hashmap: introduce hash_ops to make struct Hashmap smallerMichal Schmidt2014-09-15
| | | | | | | | | 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.
* resolved: fall back to hardcoded ifindex when checking if a link is the loopbackTom Gundersen2014-09-13
| | | | | | Reported by Philippe De Swert <philippedeswert@gmail.com>. Coverity CID#1237656
* resolved: fix typo in log messageLennart Poettering2014-08-22
|
* shared: add MAXSIZE() and use it in resolvedDavid Herrmann2014-08-22
| | | | | | | | | | | 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.
* notify: send STOPPING=1 from our daemonsLennart Poettering2014-08-21
|
* resolved: write resolv.conf search - switch argumentsTom Gundersen2014-08-20
| | | | Found by Lukáš Nykrýn.
* resolved: fix which return codes we checkLennart Poettering2014-08-20
| | | | Discovered by Lukas Nykryn
* resolved-dns-rr: fix typoLukas Nykryn2014-08-20
| | | | | a->rrsig.type_covered != a->rrsig.type_covered" is always false regardless of the values of its operands because those operands are identical.
* resolve: fix compilation on LLVM+clangDavid Herrmann2014-08-15
| | | | | LLVM+clang does not allow statement-expressions inside of type-declarations (file-scope). Use CONST_MAX() to avoid this.
* resolved: fix assertion when joining llmnr mcast groupLennart Poettering2014-08-15
|
* resolved: pull in domain names from sd-networkTom Gundersen2014-08-14
|