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. |
011696f76233486bc56c266b18a328924f70269c |
|
01-Feb-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: rework what ResolveHostname() with family == AF_UNSPEC means
Previously, if a hostanem is resolved with AF_UNSPEC specified, this would be used as indication to resolve both an
AF_INET and an AF_INET6 address. With this change this logic is altered: an AF_INET address is only resolved if there's
actually a routable IPv4 address on the specific interface, and similar an AF_INET6 address is only resolved if there's
a routable IPv6 address. With this in place, it's ensured that the returned data is actually connectable by
applications. This logic mimics glibc's resolver behaviour.
Note that if the client asks explicitly for AF_INET or AF_INET6 it will get what it asked for.
This also simplifies the logic how it is determined whether a specific lookup shall take place on a scope.
Specifically, the checks with dns_scope_good_key() are now moved out of the transaction code and into the query code,
so that we don't even create a transaction object on a specific scope if we cannot execute the resolution on it anyway. |
77abf3c1159a0326d05dba9cc7475d947fde0aa0 |
|
29-Jan-2016 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
resolved: emit full path to file we failed to write
Otherwise it's unclear if it's /etc/resolv.conf or some
other file that is meant. |
2d8950384f3137aafcce22b29912b2b61e6d86fb |
|
26-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: prorize rtnl and sd-network event sources
Lets make sure we always take notice of network changes before answering client requests.
This way, calls like SetLinkDNS() become race-free as the specified interface index is guarantee to have been processed
if it exists before we make changes to it. |
dd0bc0f1414cc1d0fa73a29470bd14944e4942d3 |
|
25-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: synthesize RRs for data from /etc/hosts
This way the difference between lookups via NSS and our native bus API should become minimal. |
59c5b5974d106c5ebad080739b41d0e92ab74d29 |
|
25-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: log each time we increase the DNSSEC verdict counters
Also, don't consider RRs that aren't primary to the lookups we do as relevant to the lookups. |
c69fa7e3c44240bedc0ee1bd89fecf954783ac85 |
|
19-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: rework DNSSECSupported property
Not only report whether the server actually supports DNSSEC, but also first check whether DNSSEC is actually enabled
for it in our local configuration.
Also, export a per-link DNSSECSupported property in addition to the existing manager-wide property. |
aa4a9deb7d3db95ffb1fd18791be66f58d06a69e |
|
11-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved: set a description on all our event sources |
ad6c04756115809d615dede330213d73edf732a8 |
|
05-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved,networkd: add a per-interface DNSSEC setting
This adds a DNSSEC= setting to .network files, and makes resolved honour
them. |
af49ca27ffd790d78dbbb465b978266dfd5c93da |
|
05-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
resolved,networkd: unify ResolveSupport enum
networkd previously knew an enum "ResolveSupport" for configuring
per-interface LLMNR support, resolved had a similar enum just called
"Support", with the same value and similar pasers.
Unify this, call the enum ResolveSupport, and port both daemons to it. |
b18b8662154b46f03ddeac00e52d157c87d474e3 |
|
05-Jan-2016 |
Lennart Poettering <lennart@poettering.net> |
basic: add string table macros for "extended boolean" enums
In a couple of cases we maintain configuration settings that know an on
and off state, like a boolean, plus some additional states. We generally
parse them as booleans first, and if that fails check for specific
additional values.
This adds a generalized set of macros for parsing such settings, and
ports one use in resolved and another in networkd over to it. |
deb3f3d335d64601bb2d8a7520d8303f99d8a071 |
|
18-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: use right format specifier to print transaction ID |
b4f1862df2e45aba90386887d685b8bf3c840e10 |
|
08-Dec-2015 |
Daniel Mack <daniel@zonque.org> |
resolved: create dns scopes for mDNS
Follow what LLMNR does, and create per-link DnsScope objects. |
bc7702b098b63031767174206f5df14a8ccb45cf |
|
08-Dec-2015 |
Daniel Mack <daniel@zonque.org> |
resolved: add infrastructure for mDNS related sockets
Just hook up mDNS listeners with an empty packet dispather function,
introduce a config directive, man page updates etc. |
0d2cd47617b423f37d7425be7a56ae2fca8ff9f6 |
|
03-Dec-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: add a simple trust anchor database as additional RR source
When doing DNSSEC lookups we need to know one or more DS or DNSKEY RRs
as trust anchors to validate lookups. With this change we add a
compiled-in trust anchor database, serving the root DS key as of today,
retrieved from:
https://data.iana.org/root-anchors/root-anchors.xml
The interface is kept generic, so that additional DS or DNSKEY RRs may
be served via the same interface, for example by provisioning them
locally in external files to support "islands" of security.
The trust anchor database becomes the fourth source of RRs we maintain,
besides, the network, the local cache, and the local zone. |
4afd3348c7506dd1d36305b7bcb9feb8952b9d6b |
|
27-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: expose "p"-suffix unref calls in public APIs to make gcc cleanup easy
GLIB has recently started to officially support the gcc cleanup
attribute in its public API, hence let's do the same for our APIs.
With this patch we'll define an xyz_unrefp() call for each public
xyz_unref() call, to make it easy to use inside a
__attribute__((cleanup())) expression. Then, all code is ported over to
make use of this.
The new calls are also documented in the man pages, with examples how to
use them (well, I only added docs where the _unref() call itself already
had docs, and the examples, only cover sd_bus_unrefp() and
sd_event_unrefp()).
This also renames sd_lldp_free() to sd_lldp_unref(), since that's how we
tend to call our destructors these days.
Note that this defines no public macro that wraps gcc's attribute and
makes it easier to use. While I think it's our duty in the library to
make our stuff easy to use, I figure it's not our duty to make gcc's own
features easy to use on its own. Most likely, client code which wants to
make use of this should define its own:
#define _cleanup_(function) __attribute__((cleanup(function)))
Or similar, to make the gcc feature easier to use.
Making this logic public has the benefit that we can remove three header
files whose only purpose was to define these functions internally.
See #2008. |
422baca0f230913158078fddf884e06c8c64a316 |
|
25-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
dns-domain: rework dns_label_escape() to not imply memory allocation
The new dns_label_escape() call now operates on a buffer passed in,
similar to dns_label_unescape(). This should make decoding a bit faster,
and nicer. |
9176a57c101d51b4a7fb4141240b5ce03abac57d |
|
25-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: split out calls to compile full list of dns servers and search domains
Let's split this out from the resolv.conf parser, so that this becomes
generically useful. |
4b95f1798f22c1bb75295f448188560cb6ec9ece |
|
25-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: unify DnsServer handling code between Link and Manager
This copies concepts we introduced for the DnsSearchDomain stuff, and
reworks the operations on lists of dns servers to be reusable and
generic for use both with the Link and the Manager object. |
a51c10485af349eb15faa4d1a63b9818bcf3e589 |
|
25-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: add a generic DnsSearchDomain concept
With this change, we add a new object to resolved, "DnsSearchDomain="
which wraps a search domain. This is then used to introduce a global
search domain list, in addition to the existing per-link search domain
list which is reword to make use of this new object too.
This is preparation for implement proper unicast DNS search domain
support. |
00fa60ae3b2823036cb3e7734f16bce30cb7441d |
|
25-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: make sure FallbackDNS= overrides built-in servers, doesn't extend them
Closes #342. |
0eac462399c8e87bcce252cf058eba9f2678f2bd |
|
25-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: rework dns server lifecycle logic
Previously, there was a chance of memory corruption, because when
switching to the next DNS server we didn't care whether they linked list
of DNS servers was still valid.
Clean up lifecycle of the dns server logic:
- When a DnsServer object is still in the linked list of DnsServers for
a link or the manager, indicate so with a "linked" boolean field, and
never follow the linked list if that boolean is not set.
- When picking a DnsServer to use for a link ot manager, always
explicitly take a reference.
This also rearranges some logic, to make the tracking of dns servers by
link and globally more alike. |
f2f1dbe50fea13abadc9c1e845a29031b90b40f3 |
|
25-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: move dns server picking code from resolved-manager.c to resolved-dns-server.c |
f8dc7e343d903f053070d01f3273db819deee951 |
|
25-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: split out all code dealing with /etc/resolv.conf into its own .c file
No functional changes. |
636e813dc98ea40c58c6c85bc5e7e3c9f0904ea2 |
|
25-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: unify code for parsing dns server information
Let's use the same parser when parsing dns server information from
/etc/resolv.conf and our native configuration file.
Also, move all code that manages lists of dns servers to a single place.
resolved-dns-server.c |
e3528a5c46c815974d4d17ea9964278f7ee9caae |
|
25-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: /etc/resolved.conf missing is not an error
Don't propagate any error in this case, it's really not an error. |
a564ca2fd113b2876e677beab60b38d50591e246 |
|
23-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: fix minor memory leak when shuttin down
We need to free the rtnl watch too. |
b5efdb8af40ea759a1ea584c1bc44ecc81dd00ce |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out allocation calls into alloc-util.[ch] |
8b43440b7ef4b81c69c31de7ff820dc07a780254 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: move string table stuff into its own string-table.[ch] |
6bedfcbb2970e06a4d3280c8fb62083d252ede73 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split string parsing related calls from util.[ch] into parse-util.[ch] |
c004493cdefc1f43a3956ca529e8070f8d70be56 |
|
26-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out IO related calls to io-util.[ch] |
3ffd4af22052963e7a29431721ee204e634bea75 |
|
25-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out fd-related operations into fd-util.[ch]
There are more than enough to deserve their own .c file, hence move them
over. |
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. |
76ef789d264f9eb7d7624b994aa6eead1dacfac4 |
|
09-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: make use of log_error_errno() return value
Turns this:
r = -errno;
log_error_errno(errno, "foo");
into this:
r = log_error_errno(errno, "foo");
and this:
r = log_error_errno(errno, "foo");
return r;
into this:
return log_error_errno(errno, "foo"); |
d9fcf2ba1abe81ed3a7a151d6db09139b4dc7a09 |
|
26-Aug-2015 |
Lennart Poettering <lennart@poettering.net> |
manager: close hostname fd *after* removing it epoll
Otherwise the epoll removal will fail and result in a warning. |
4d506d6bb757af3b99e0876234c465e6898c5ea4 |
|
26-Aug-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: dump cache and zone contents to syslog on SIGUSR1 |
62f176068c31de4b7b56aae06efaf27c410dc3c3 |
|
21-Aug-2015 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
remove unused variables |
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. |
3e044c492e3ebe64f4e3175c94f9db8a62557b82 |
|
17-Aug-2015 |
Markus Elfring <elfring@users.sourceforge.net> |
Bug #944: Deletion of unnecessary checks before a few calls of systemd functions
The following functions return immediately if a null pointer was passed.
* calendar_spec_free
* link_address_free
* manager_free
* sd_bus_unref
* sd_journal_close
* udev_monitor_unref
* udev_unref
It is therefore not needed that a function caller repeats a corresponding check.
This issue was fixed by using the software Coccinelle 1.0.1. |
72290734be81e83e6ef9520c07692f68095eb5b2 |
|
27-Jul-2015 |
Tom Gundersen <teg@jklm.no> |
resolved: scope - write() unicast DNS packets
As we have connect()ed to the desired DNS server, we no longer need to pass
control messages manually when sending packets. Simplify the logic accordingly. |
86ad4cd709ced8daf2b75ab564dece1ce82ffed9 |
|
27-Jul-2015 |
Tom Gundersen <teg@jklm.no> |
resolved: transaction - don't request PKTINFO for unicast DNS
This was only ever used by LLMNR, so don't request this for unicast DNS packets. |
d20b1667dbab8bccf69735523a0d5fc645e81b80 |
|
14-Jul-2015 |
Tom Gundersen <teg@jklm.no> |
resolved: use one UDP socket per transaction
We used to have one global socket, use one per transaction instead. This
has the side-effect of giving us a random UDP port per transaction, and
hence increasing the entropy and making cache poisoining significantly
harder to achieve.
We still reuse the same port number for packets belonging to the same
transaction (resent packets). |
91b14d6ff362b938a72db17b095ee9903d07381b |
|
14-Jul-2015 |
Tom Gundersen <teg@jklm.no> |
resolved: reference count the dns servers
We want to reference the servers from their active transactions, so make sure
they stay around as long as the transaction does. |
5f402ae84bbc08fe8de5682e371b3f66c387da52 |
|
13-Jul-2015 |
Daniel Mack <daniel@zonque.org> |
resolved: move LLMNR related functions into separate file |
1c4baffc1895809bae9ac36b670af90a4cb9cd7d |
|
13-Jun-2015 |
Tom Gundersen <teg@jklm.no> |
sd-netlink: rename from sd-rtnl |
31710be527104abad7541b122ee10c4560bd14d2 |
|
11-Jun-2015 |
Tom Gundersen <teg@jklm.no> |
sd-rtnl: make joining broadcast groups implicit |
4ad7f2761da661853dcc29d542efb4727abb1101 |
|
10-Jun-2015 |
Nick Owens <nick.owens@coreos.com> |
resolve: move dns routines into shared |
2a1288ff89322a2f49c79f6d1832c8164c14a05c |
|
10-Jun-2015 |
Lennart Poettering <lennart@poettering.net> |
util: introduce CMSG_FOREACH() macro and make use of it everywhere
It's only marginally shorter then the usual for() loop, but certainly
more readable. |
cab5b05903096e1c9cf5575ccc73f89d15c8db69 |
|
18-May-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: fix crash when shutting down
Reported by Cristian Rodríguez
http://lists.freedesktop.org/archives/systemd-devel/2015-May/031626.html |
958b66ea16deddd794b3a52643bd44633e165ead |
|
18-May-2015 |
Lennart Poettering <lennart@poettering.net> |
util: split all hostname related calls into hostname-util.c |
3df3e884ae1237ef0d4d23b0e80f4ffda95ac135 |
|
11-Apr-2015 |
Ronny Chevalier <chevalier.ronny@gmail.com> |
shared: add random-util.[ch] |
822db23cfa98a9fbc48f41e11caafb6f1017e052 |
|
08-Apr-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: maintain order when writing resolv.conf entries
http://lists.freedesktop.org/archives/systemd-devel/2015-March/029850.html |
2eec67acbb00593e414549a7e5b35eb7dd776b1b |
|
23-Feb-2015 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
remove unused includes
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. |
0a6f50c0afdfc434b492493bd9efab20cbee8623 |
|
12-Feb-2015 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
include <poll.h> instead of <sys/poll.h>
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. |
a38d99451f2bf8026ec51aee91662292e823c6a8 |
|
12-Feb-2015 |
Lennart Poettering <lennart@poettering.net> |
Revert "tree-wide: Always use recvmsg with MSG_CMSG_CLOEXEC"
This reverts commit d6d810fbf8071f8510450dbacd1d083f37603656.
It's apparently not OK to pass MSG_CMSG_CLOEXEC to recvmsg() of raw
sockets. |
d6d810fbf8071f8510450dbacd1d083f37603656 |
|
10-Feb-2015 |
Cristian Rodríguez <crrodriguez@opensuse.org> |
tree-wide: Always use recvmsg with MSG_CMSG_CLOEXEC |
cc98b3025eeb89addb76a27390cb2baca4eab8b9 |
|
26-Jan-2015 |
Torstein Husebø <torstein@huseboe.net> |
treewide: fix multiple typos |
36a03ca2a8952ca1acb29fbe796210c27ff71aff |
|
23-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
resolved: when rereading /etc/resolv.conf, always start using first DNS 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... |
56f64d95763a799ba4475daf44d8e9f72a1bd474 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: use log_*_errno whenever %m is in the format string
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. |
8d3d7072e609ef0e0fb37e1d19a29307d58146c3 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: a few more log_*_errno + return simplifications
The one in tmpfiles.c:create_item() even looks like it fixes a bug. |
da927ba997d68401563b927f92e6e40e021a8e5c |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: no need to negate errno for log_*_errno()
It corrrectly handles both positive and negative errno values. |
0a1beeb64207eaa88ab9236787b1cbc2f704ae14 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: auto-convert the simple cases to log_*_errno()
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(). |
a5f035960006556beab51c42e6948985635e261a |
|
22-Oct-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: simplify detection of packets from the loopback device
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. |
a5a807e63a50314e190e9166d8a453cd8dd258e3 |
|
14-Oct-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
resolved: apply label to /run/systemd/resolve/resolv.conf
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. |
4713135eae4f7b6b670a98476fe413edfa1d9f41 |
|
14-Oct-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
resolved: split out writing of resolv.conf
manager_write_resolv_conf() is quite long anyway. |
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. |
d1c457badfce0dc86b54b2cac2c5eec99d7bc65e |
|
13-Sep-2014 |
Tom Gundersen <teg@jklm.no> |
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 |
c4147df156835513c43260a14fc9f7af177f737f |
|
22-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: fix typo in log message |
40a1eebde6be7ac3f1885147fc24e06ad1da260c |
|
22-Aug-2014 |
David Herrmann <dh.herrmann@gmail.com> |
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. |
a9feff3d774eaa1cc1b59189e8f344c01e69f888 |
|
20-Aug-2014 |
Tom Gundersen <teg@jklm.no> |
resolved: write resolv.conf search - switch arguments
Found by Lukáš Nykrýn. |
bf32f99f65ec42539af65736b057c9e09d3987b9 |
|
15-Aug-2014 |
David Herrmann <dh.herrmann@gmail.com> |
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. |
bda2c408f8a739c19161818bcc842107f60652a2 |
|
14-Aug-2014 |
Tom Gundersen <teg@jklm.no> |
resolved: pull in domain names from sd-network |
90ab504273a7f186ebb76e6acfb778b4e0d7c91b |
|
13-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: skip IPv6 LLMNR if IPv6 is not available |
3e684349c2cead2e6fd2f816c34eb17daba23a49 |
|
12-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: unify logic how we flush out DNS servers we learnt |
87f5a19343acf8ba697acc5a62bdb1a2b8c9eda3 |
|
12-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: filter out duplicate DNS servers when writing resolv.conf |
556a22945fcc88ca27ae7ecc46c9bb2727e37895 |
|
11-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
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. |
902bb5d8abb2a7d258741828d212ca549ab16950 |
|
11-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: verify all RRs when we come back from suspend |
a407657425a3e47fd2b559cd3bc800f791303f63 |
|
11-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: implement full LLMNR conflict detection logic |
21d73c87b09ec2b8642424bc714ce9af3da4fc40 |
|
04-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: actually read the initial state data from networkd when we initialize |
f0e1546763304aedc90e91d70dab9eeb7c966cf8 |
|
04-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: fix order in which we destroy manager resources |
edc501d4674dadc304d45a7e1c5b69e207eb8cd4 |
|
04-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
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. |
e850d8e1acad4b06ba212145fee67932a3417cd6 |
|
03-Aug-2014 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
resolved: remove unused variables |
2c27fbca2d88214bd305272308a370a962818f1e |
|
01-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: flush cache each time we change to a different DNS server |
5cb36f41f01cf4b1f4395abfffd1b33116591e58 |
|
01-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: read the system /etc/resolv.conf unless we wrote it ourselves
This way we integrate nicely with foreign network management stacks,
such as NM. |
39d8db043b599a7382f94bfc904d5e108af438bd |
|
01-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: rename resolved.h to resolved-manager.h
After all it pretty much exlcusively containers definitions about the
"Manager" object, hence let's call this the most obvious way. |
4e945a6f7971fd7d1f6b2c62ee3afdaff3c95ce4 |
|
01-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: beef up DNS server configuration logic
We now maintain two lists of DNS servers: system servers and fallback
servers.
system servers are used in combination with any per-link servers.
fallback servers are only used if there are no system servers or
per-link servers configured.
The system server list is supposed to be populated from a foreign tool's
/etc/resolv.conf (not implemented yet).
Also adds a configuration switch for LLMNR, that allows configuring
whether LLMNR shall be used simply for resolving or also for responding. |
eb60f9cd4e93ff5016dc1b5486fd1b7e1565fd92 |
|
31-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
hostnamed: watch system hostname changes and update LLMNR RRs accordingly |
ec2c5e4398f9d65e5dfe61530f2556224733d1e6 |
|
31-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: implement LLMNR uniqueness verification |
b2fadec6048adb3596f2633cb7fe7a49f5937a18 |
|
31-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Properly report invalid quoted strings
$ systemd-analyze verify trailing-g.service
[./trailing-g.service:2] Trailing garbage, ignoring.
trailing-g.service lacks ExecStart setting. Refusing.
Error: org.freedesktop.systemd1.LoadFailed: Unit trailing-g.service failed to load: Invalid argument.
Failed to create trailing-g.service/start: Invalid argument |
a2a5291b3f5ab6ed4c92f51d0fd10a03047380d8 |
|
31-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Reject invalid quoted strings
String which ended in an unfinished quote were accepted, potentially
with bad memory accesses.
Reject anything which ends in a unfished quote, or contains
non-whitespace characters right after the closing quote.
_FOREACH_WORD now returns the invalid character in *state. But this return
value is not checked anywhere yet.
Also, make 'word' and 'state' variables const pointers, and rename 'w'
to 'word' in various places. Things are easier to read if the same name
is used consistently.
mbiebl_> am I correct that something like this doesn't work
mbiebl_> ExecStart=/usr/bin/encfs --extpass='/bin/systemd-ask-passwd "Unlock EncFS"'
mbiebl_> systemd seems to strip of the quotes
mbiebl_> systemctl status shows
mbiebl_> ExecStart=/usr/bin/encfs --extpass='/bin/systemd-ask-password Unlock EncFS $RootDir $MountPoint
mbiebl_> which is pretty weird |
a2a416f768e2aa7db5b975cd50eb19237cac9cce |
|
29-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: add more debug logging |
bf3f1271e2cc0c22b11c8a805a997578dabe9191 |
|
29-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: set LLMNR TCP and UDP TTLs to the values suggested by the RFC |
623a4c97b9175f95c4b1c6fc34e36c56f1e4ddbf |
|
29-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
resolve: add llmnr responder side for UDP and TCP
Name defending is still missing. |
6073b6f26ab9fc6bf335faa7073ec443eef093fd |
|
23-Jul-2014 |
Tom Gundersen <teg@jklm.no> |
resolved: don't read DHCP leases
networkd will expose both statically configured DNS servers and servers
receieved over DHCP in sd_network_get_dns(), so no need to keep
the distinction in resolved. |
faa133f3aa7a18f26563dc5d6b95898cb315c37a |
|
23-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: rework logic so that we can share transactions between queries of different clients |
0dd25fb9f005d8ab7ac4bc10a609d00569f8c56a |
|
18-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
change type for address family to "int"
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. |
1716f6dcf54d4c181c2e2558e3d5414f54c8d9ca |
|
18-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: add LLMNR support for looking up names |
e1c959948c0e31d6997bcdfbabfbd077784b2bae |
|
17-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: properly handle MTU logic |
0014a4ad505d119c7ac4346d9d774c3f17f663a5 |
|
17-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
sd-network: fix parameter order for sd_network_monitor_new()
Constructors should return the object they created as first parameter,
except when they are generated as a child/member object of some other
object in which case that should be first. |
36f822c4bd077f9121757e24b6516e5c7ada63b5 |
|
17-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Let config_parse open file where applicable
Special care is needed so that we get an error message if the
file failed to parse, but not when it is missing. To avoid duplicating
the same error check in every caller, add an additional 'warn' boolean
to tell config_parse whether a message should be issued.
This makes things both shorter and more robust wrt. to error reporting. |
ad867662936a4c7ab2c7116d804c272338801231 |
|
16-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: support for TCP DNS queries |
3cb10d3a0b1b6a7c44f307f2abb5215104e16941 |
|
16-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
dns-domain: introduce macros for accessing all DNS header fields |
e9f3d2d508bfd9fb5b54e82994bda365a71eb864 |
|
16-Jul-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Constify ConfigTableItem tables |
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) |
096b6773886bd7a0c8c97aa684b0b67dfae58355 |
|
10-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: properly free network monitor |
c92e531c82a9815ec349aa1bf31236b86b2d5311 |
|
07-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: make use of union in_addr_union in resolved, too |
987d561fe202568c0a2880cf047c7833fd365c7a |
|
07-Jul-2014 |
Lennart Poettering <lennart@poettering.net> |
resolved: let config_parse() open the configuration file for us |
b686acb27ea4de042320fa196cfb14e08f30165b |
|
02-Jun-2014 |
Tom Gundersen <teg@jklm.no> |
resolved: move resolv.conf to resolved's runtime dir |
091a364c802e34a58f3260c9cb5db9b75c62215c |
|
19-May-2014 |
Tom Gundersen <teg@jklm.no> |
resolved: add daemon to manage resolv.conf
Also remove the equivalent functionality from networkd. |