]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
8 years agoresolved: no need to check for NULL explicitly before invoking dns_packet_unref()
Lennart Poettering [Thu, 10 Dec 2015 12:28:33 +0000 (13:28 +0100)] 
resolved: no need to check for NULL explicitly before invoking dns_packet_unref()

8 years agoresolved: extend list of pseudo RR types
Lennart Poettering [Thu, 10 Dec 2015 12:27:58 +0000 (13:27 +0100)] 
resolved: extend list of pseudo RR types

Also, explain the situation with a longer comment.

8 years agoMerge pull request #2096 from teg/resolved-cache
Daniel Mack [Thu, 10 Dec 2015 19:48:42 +0000 (20:48 +0100)] 
Merge pull request #2096 from teg/resolved-cache

Misc resolved cache fixes

8 years agoresolved: cache - only stringify RR keys when in debug mode 2096/head
Tom Gundersen [Thu, 10 Dec 2015 19:17:49 +0000 (20:17 +0100)] 
resolved: cache - only stringify RR keys when in debug mode

This is in the fast path, so let's not do all this work unneccessarily.

8 years agoresolved: cache - don't flush the cache of mDNS records unneccesarily
Tom Gundersen [Thu, 10 Dec 2015 18:57:41 +0000 (19:57 +0100)] 
resolved: cache - don't flush the cache of mDNS records unneccesarily

When the DNS_RESOURCE_KEY_CACHE_FLUSH flag is not set for an mDNS packet, we should not flush
the cache for RRs with matching keys. However, we were unconditionally flushing the cache
also for these packets.

Now mark all packets as cache_flush by default, except for these mDNS packets, and respect
that flag in the cache handling.

This fixes 90325e8c2e559a21ef0bc2f26b844c140faf8020.

8 years agoTODO
Tom Gundersen [Thu, 10 Dec 2015 18:47:47 +0000 (19:47 +0100)] 
TODO

8 years agoMerge pull request #2133 from poettering/import-drop-dkr
Daniel Mack [Thu, 10 Dec 2015 16:40:39 +0000 (17:40 +0100)] 
Merge pull request #2133 from poettering/import-drop-dkr

importd: drop dkr support

8 years agoresolved: cache - rework which RR types we apply redirection to
Tom Gundersen [Thu, 3 Dec 2015 20:40:06 +0000 (21:40 +0100)] 
resolved: cache - rework which RR types we apply redirection to

The logic of dns_cache_get() is now:
 - look up the precise key;
 - look up NXDOMAIN item;
 - if an RR type that may be redirected
   (i.e., not CNAME, DNAME, RRSIG, NSEC, NSEC3, SIG, KEY, or
   NXT) look up a correpsonding CNAME or DNAME record;
 - look up a corresponding NSEC record;

Before this change we would give up before potentially finding
negative cache entries for DNAME, CNAME and NSEC records, we
would return NSEC records for aliases where we had DNAME or CNAME
records available and we would incorrectly try to redirect DNSSEC RRs.

8 years agoresolved: cache - improve logging
Tom Gundersen [Thu, 3 Dec 2015 20:26:19 +0000 (21:26 +0100)] 
resolved: cache - improve logging

Some DNS servers will hand out negative answers without SOA records,
these can not be cached, so log about that fact.

8 years agoresolved: cache - don't cache NXDOMAIN by TYPE
Tom Gundersen [Thu, 3 Dec 2015 18:53:35 +0000 (19:53 +0100)] 
resolved: cache - don't cache NXDOMAIN by TYPE

An NXDOMAIN entry means there are no RRs of any type for a name,
so only cache by CLASS + NAME, rather than CLASS + NAME + TYPE.

8 years agoresolved: cache - do negative caching only on the canonical name
Tom Gundersen [Wed, 2 Dec 2015 17:46:32 +0000 (18:46 +0100)] 
resolved: cache - do negative caching only on the canonical name

Apart from dropping redundant information, this fixes an issue
where, due to broken DNS servers, we can only be certain of whether
an apparent NODATA response is in fact an NXDOMAIN response after
explicitly resolving the canonical name. This issue is outlined in
RFC2308. Moreover, by caching NXDOMAIN for an existing name, we
would mistakenly return NXDOMAIN for types which should not be
redirected. I.e., a query for AAAA on test-nx-1.jklm.no correctly
returns NXDOMAIN, but a query for CNAME should return the record
and a query for DNAME should return NODATA.

Note that this means we will not cache an NXDOMAIN response in the
presence of redirection, meaning one redundant roundtrip in case the
name is queried again.

8 years agoMerge pull request #2134 from jorgenschaefer/detect-ipv6-with-sockstat6
Daniel Mack [Thu, 10 Dec 2015 15:54:57 +0000 (16:54 +0100)] 
Merge pull request #2134 from jorgenschaefer/detect-ipv6-with-sockstat6

Use /proc/net/sockstat6 to detect IPv6 support

8 years agoimportd: drop dkr support 2133/head
Lennart Poettering [Thu, 10 Dec 2015 11:40:04 +0000 (12:40 +0100)] 
importd: drop dkr support

The current code is not compatible with current dkr protocols anyway,
and dkr has a different focus ("microservices") than nspawn anyway
("whole machine containers"), hence drop support for it, we cannot
reasonably keep this up to date, and it creates the impression we'd
actually care for the microservices usecase.

8 years agoMerge pull request #2135 from zonque/resolved-mdns-3
Lennart Poettering [Thu, 10 Dec 2015 15:49:31 +0000 (16:49 +0100)] 
Merge pull request #2135 from zonque/resolved-mdns-3

resolved: more mDNS specific bits (3)

8 years agoresolved: make sure the packet's transaction ID is always 0 for mDNS 2135/head
Daniel Mack [Thu, 10 Dec 2015 14:59:30 +0000 (15:59 +0100)] 
resolved: make sure the packet's transaction ID is always 0 for mDNS

RFC6762, 18.1:

   In multicast query messages, the Query Identifier SHOULD be set to
   zero on transmission.

8 years agoresolved: discard any reply packet that contains a bogus name
Daniel Mack [Thu, 10 Dec 2015 15:08:43 +0000 (16:08 +0100)] 
resolved: discard any reply packet that contains a bogus name

Only .in-addr.arpa and .local are considered local in mDNS, so discard the
packet if anything else is thrown at us.

8 years agoMerge pull request #2129 from poettering/dnssec3
Tom Gundersen [Thu, 10 Dec 2015 14:22:18 +0000 (15:22 +0100)] 
Merge pull request #2129 from poettering/dnssec3

Third DNSSEC patch series

8 years agoUse /proc/net/sockstat6 to detect IPv6 support 2134/head
Jorgen Schaefer [Thu, 10 Dec 2015 12:24:45 +0000 (13:24 +0100)] 
Use /proc/net/sockstat6 to detect IPv6 support

The file /sys/module/ipv6 does not exist in all container
implementations (e.g. Virtuozzo). Using /proc/net/sockstat6
detects IPv6 support reliably in these environments, too.

This file does not exist when the kernel is not compiled with
IPv6 support, or if IPv6 support is disabled, so simply checking
for existence should be a suitable check.

Fixes #2059

8 years agoMerge pull request #2086 from evverx/fix-journal-upload-installation
Lennart Poettering [Thu, 10 Dec 2015 11:05:26 +0000 (12:05 +0100)] 
Merge pull request #2086 from evverx/fix-journal-upload-installation

build: fix systemd-journal-upload installation

8 years agoREADME: Recommend kinvolk regarding engineering services
Lennart Poettering [Thu, 10 Dec 2015 10:57:08 +0000 (11:57 +0100)] 
README: Recommend kinvolk regarding engineering services

They are our friends, do systemd development, hence add them.

8 years agoMerge pull request #2076 from keszybz/downgrade-masked-unit-message
Lennart Poettering [Thu, 10 Dec 2015 10:40:23 +0000 (11:40 +0100)] 
Merge pull request #2076 from keszybz/downgrade-masked-unit-message

core: do not warn about Wants depencencies on masked units

8 years agoresolved: rename dns_transaction_prepare_next_attempt() 2129/head
Lennart Poettering [Thu, 10 Dec 2015 10:25:26 +0000 (11:25 +0100)] 
resolved: rename dns_transaction_prepare_next_attempt()

Let's simply call it dns_transaction_prepare(), so that we have the nice
cycle for prepare() → go() → emit() → process().

After all it's pretty clear that what we prepare there, and we dont call
the others go_next_attempt(), emit_next_attempt() or
process_next_attempt().

8 years agojournal: make mmap_cache_unref() a NOP when NULL is passed, like all other destructors
Lennart Poettering [Thu, 10 Dec 2015 10:25:14 +0000 (11:25 +0100)] 
journal: make mmap_cache_unref() a NOP when NULL is passed, like all other destructors

8 years agoresolved: don't accept doing queries for invalid RR types
Lennart Poettering [Wed, 9 Dec 2015 18:08:45 +0000 (19:08 +0100)] 
resolved: don't accept doing queries for invalid RR types

8 years agoresolved: chase DNSKEY/DS RRs when doing look-ups with DNSSEC enabled
Lennart Poettering [Wed, 9 Dec 2015 17:13:16 +0000 (18:13 +0100)] 
resolved: chase DNSKEY/DS RRs when doing look-ups with DNSSEC enabled

This adds initial support for validating RRSIG/DNSKEY/DS chains when
doing lookups. Proof-of-non-existance, or proof-of-unsigned-zones is not
implemented yet.

With this change DnsTransaction objects will generate additional
DnsTransaction objects when looking for DNSKEY or DS RRs to validate an
RRSIG on a response. DnsTransaction objects are thus created for three
reasons now:

1) Because a user asked for something to be resolved, i.e. requested by
   a DnsQuery/DnsQueryCandidate object.
2) As result of LLMNR RR probing, requested by a DnsZoneItem.
3) Because another DnsTransaction requires the requested RRs for
   validation of its own response.

DnsTransactions are shared between all these users, and are GC
automatically as soon as all of these users don't need a specific
transaction anymore.

To unify the handling of these three reasons for existance for a
DnsTransaction, a new common naming is introduced: each DnsTransaction
now tracks its "owners" via a Set* object named "notify_xyz", containing
all owners to notify on completion.

A new DnsTransaction state is introduced called "VALIDATING" that is
entered after a response has been receieved which needs to be validated,
as long as we are still waiting for the DNSKEY/DS RRs from other
DnsTransactions.

This patch will request the DNSKEY/DS RRs bottom-up, and then validate
them top-down.

Caching of RRs is now only done after verification, so that the cache is
not poisoned with known invalid data.

The "DnsAnswer" object gained a substantial number of new calls, since
we need to add/remove RRs to it dynamically now.

8 years agoresolved: when matching up DNSKEY and DS RRs, it's fine if we don't support the DNSKE...
Lennart Poettering [Wed, 9 Dec 2015 17:11:28 +0000 (18:11 +0100)] 
resolved: when matching up DNSKEY and DS RRs, it's fine if we don't support the DNSKEY's algorithm

As long as we support the digest we are good.

8 years agoresolved: when matching up RRSIG and DNSKEY RRs, use the RRSIG's signer name, not...
Lennart Poettering [Wed, 9 Dec 2015 17:09:06 +0000 (18:09 +0100)] 
resolved: when matching up RRSIG and DNSKEY RRs, use the RRSIG's signer name, not the owner name

When the DNSKEY is in higher zone, then that's OK, and we need to check
the RRSIG's signer name against the DNSKEY hence.

8 years agoresolved: fix sorting of RRsets
Lennart Poettering [Wed, 9 Dec 2015 17:07:55 +0000 (18:07 +0100)] 
resolved: fix sorting of RRsets

We actually maintain an array of pointers to RRs, not of RRs themselves,
fix the qsort() invocation accordingly.

8 years agoresolved: grow DnsAnswer exponentially
Lennart Poettering [Wed, 9 Dec 2015 17:05:53 +0000 (18:05 +0100)] 
resolved: grow DnsAnswer exponentially

When increasing the DnsAnswer array, don't operate piecemeal, grow the
array exponentially.

This way, the default logic for DnsAnswer allocations matches the
behaviour for GREEDY_REALLOC and suchlike, and we can reduce the number
of necessary allocations.

8 years agoresolved: log when we chase a CNAME RR
Lennart Poettering [Wed, 9 Dec 2015 17:04:03 +0000 (18:04 +0100)] 
resolved: log when we chase a CNAME RR

8 years agoresolved: reenable caching for LLMNR
Lennart Poettering [Wed, 9 Dec 2015 17:00:58 +0000 (18:00 +0100)] 
resolved: reenable caching for LLMNR

This got borked in 547493c5ad5c82032e247609970f96be76c2d661.

8 years agoresolved: split out check whether reply matches our question
Lennart Poettering [Wed, 9 Dec 2015 16:49:05 +0000 (17:49 +0100)] 
resolved: split out check whether reply matches our question

It's complicated enough, it deserves its own call.

(Also contains some unrelated whitespace, comment and assertion changes)

8 years agoresolved: IXFR and AXFR cannot be the type of RRs, only of RR keys
Lennart Poettering [Wed, 9 Dec 2015 16:45:00 +0000 (17:45 +0100)] 
resolved: IXFR and AXFR cannot be the type of RRs, only of RR keys

Enforce this while parsing RRs.

8 years agoresolved: when parsing DNS packets, handle OPT RR specially
Lennart Poettering [Wed, 9 Dec 2015 16:43:24 +0000 (17:43 +0100)] 
resolved: when parsing DNS packets, handle OPT RR specially

As soon as we encounter the OPT RR while parsing, store it in a special
field in the DnsPacket structure. That way, we won't be confused if we
iterate through RRs, and can check that there's really only one of these
RRs around.

8 years agoresolved: refuse modifying DnsAnswer objects that have more than one reference
Lennart Poettering [Wed, 9 Dec 2015 16:41:33 +0000 (17:41 +0100)] 
resolved: refuse modifying DnsAnswer objects that have more than one reference

DnsAnswer objects should be considered immutable after having passed to
more than one user, i.e. with a reference counter > 1. Enforce that in
code, so that we can track down misuses easier.

8 years agoresolved: fix libgcrypt error checking
Lennart Poettering [Wed, 9 Dec 2015 16:40:32 +0000 (17:40 +0100)] 
resolved: fix libgcrypt error checking

libgcrypt encodes the error source in the error code, we need to mask
that away before comparing error codes.

8 years agobuild-sys: libgcrypt error messages make no sense without libgpg-error
Lennart Poettering [Wed, 9 Dec 2015 18:01:26 +0000 (19:01 +0100)] 
build-sys: libgcrypt error messages make no sense without libgpg-error

Hence, pull in this library too, if we need libgcrypt.

8 years agoresolved: split out logic to flush DnsAnswer objects
Lennart Poettering [Wed, 9 Dec 2015 16:38:48 +0000 (17:38 +0100)] 
resolved: split out logic to flush DnsAnswer objects

Let's simplify things, by making this a function call of its own.

8 years agoresolved: honour RFC6761's ban on the invalid TLD
Lennart Poettering [Wed, 9 Dec 2015 16:38:05 +0000 (17:38 +0100)] 
resolved: honour RFC6761's ban on the invalid TLD

8 years agoresolved: fix DNS_ANSWER_FOREACH_IFINDEX() to not collide with user defined ifindex...
Lennart Poettering [Wed, 9 Dec 2015 16:34:55 +0000 (17:34 +0100)] 
resolved: fix DNS_ANSWER_FOREACH_IFINDEX() to not collide with user defined ifindex variable

8 years agoresolved: partially revert 5eefe54
Lennart Poettering [Wed, 9 Dec 2015 16:32:47 +0000 (17:32 +0100)] 
resolved: partially revert 5eefe54

Quoting @teg:

"Contrary to what the comment said, we always verify redirect chains in
full, and cache all the CNAME records. There is therefore no need to
do extra negative caching along a CNAME chain."

This simply steals @teg's commit since we'll touch the SOA matching case
in a later patch, and rather want this bit gone, so that we don't have
to "fix" it, only to remove it later on.

8 years agoresolved: when outputting RRs in text form, append a trailing dot to owner names
Lennart Poettering [Wed, 9 Dec 2015 16:29:53 +0000 (17:29 +0100)] 
resolved: when outputting RRs in text form, append a trailing dot to owner names

After all, that's how this is done in DNS, and is particularly important
if we look a DS/DNSKEY RRs for the root zone itself, where the owner
name would otherwise be shown as completely empty (i.e. missing).

8 years agoresolved: shortcut RR comparisons if pointers match
Lennart Poettering [Wed, 9 Dec 2015 16:28:50 +0000 (17:28 +0100)] 
resolved: shortcut RR comparisons if pointers match

When iterating through RR lists we frequently end up comparing RRs and
RR keys with themselves, hence att a minor optimization to check ptr
values first, before doing a deep comparison.

8 years agoresolved: fix parameter type of dns_type_is_pseudo()
Lennart Poettering [Wed, 9 Dec 2015 16:27:35 +0000 (17:27 +0100)] 
resolved: fix parameter type of dns_type_is_pseudo()

DNS RR types are uint16_t after all, treat them as such.

8 years agoMerge pull request #2056 from evverx/expose-soft-limits-on-the-bus
Lennart Poettering [Thu, 10 Dec 2015 10:20:03 +0000 (11:20 +0100)] 
Merge pull request #2056 from evverx/expose-soft-limits-on-the-bus

Expose soft limits on the bus

8 years agoMerge pull request #2128 from zonque/resolved-mdns-2
Lennart Poettering [Thu, 10 Dec 2015 10:10:30 +0000 (11:10 +0100)] 
Merge pull request #2128 from zonque/resolved-mdns-2

resolved: more mDNS specific bits (2)

8 years agoresolved: add more linked packets for overlong known answers 2128/head
Daniel Mack [Wed, 9 Dec 2015 12:09:35 +0000 (13:09 +0100)] 
resolved: add more linked packets for overlong known answers

For mDNS, if we're unable to stuff all known answers into the given packet,
allocate a new one, push the RR into that one and link it to the current
one.

8 years agoresolved: handle linked packet in dns_scope_emit()
Daniel Mack [Wed, 9 Dec 2015 11:05:38 +0000 (12:05 +0100)] 
resolved: handle linked packet in dns_scope_emit()

In dns_scope_emit(), walk the list of additional packets and emit all of
them. Set the TC bit in all but the last of them.

This is specific to mDNS, so an assertion is triggered if used with other
protocols.

8 years agoresolved: add support for linked packets
Daniel Mack [Wed, 9 Dec 2015 11:01:08 +0000 (12:01 +0100)] 
resolved: add support for linked packets

For mDNS, we need to support the TC bit in case the list of known answers
exceed the maximum packet size.

For this, add a 'more' pointer to DnsPacket for an additional packet.

When a packet is unref'ed, the ->more packet is also unrefed, so it
sufficient to only keep track of the 1st packet in a chain.

8 years agoresolved: add dns_packet_set_flags()
Daniel Mack [Wed, 9 Dec 2015 10:55:54 +0000 (11:55 +0100)] 
resolved: add dns_packet_set_flags()

We need to support the TC bit in queries in case known answers exceed the
maximum packet size. Factor out the flags compilation to
dns_packet_set_flags() and make it externally available.

8 years agoMerge pull request #2108 from evverx/fix-distcheck-for-disable-resolved
Lennart Poettering [Wed, 9 Dec 2015 19:48:40 +0000 (20:48 +0100)] 
Merge pull request #2108 from evverx/fix-distcheck-for-disable-resolved

build-sys: move "dist" parts out of conditionals

8 years agoresolved: llmnr, mdns: simplify error handling
Daniel Mack [Wed, 9 Dec 2015 09:24:27 +0000 (10:24 +0100)] 
resolved: llmnr, mdns: simplify error handling

sd_event_add_io() returns the error directly and does not mess with errno.

8 years agoresolved: don't send .local requests to DNS servers
Daniel Mack [Tue, 8 Dec 2015 17:29:52 +0000 (18:29 +0100)] 
resolved: don't send .local requests to DNS servers

DNS names ending with .local are specific to mDNS, so don't use them
on DNS scopes.

8 years agoMerge pull request #2110 from keszybz/udev-indentation
Daniel Mack [Wed, 9 Dec 2015 13:18:37 +0000 (14:18 +0100)] 
Merge pull request #2110 from keszybz/udev-indentation

Udev indentation

8 years agobuild: fix systemd-journal-upload installation 2086/head
Evgeny Vereshchagin [Wed, 9 Dec 2015 01:32:22 +0000 (01:32 +0000)] 
build: fix systemd-journal-upload installation

Fixes:

$ ./configure ... --disable-microhttpd --enable-libcurl
--enable-sysusers
$ make && make install DESTDIR=$(pwd)/INST
$ ls INST/usr/lib/sysusers.d/
basic.conf  systemd.conf

There is no a file with `systemd-journald-upload`

8 years agobuild-sys: move "dist" parts out of conditionals 2108/head
Evgeny Vereshchagin [Mon, 7 Dec 2015 04:31:34 +0000 (04:31 +0000)] 
build-sys: move "dist" parts out of conditionals

This is a follow-up for commit f47477332ff

8 years agoMerge pull request #2115 from dvdhrm/rbtree
Tom Gundersen [Tue, 8 Dec 2015 16:31:09 +0000 (17:31 +0100)] 
Merge pull request #2115 from dvdhrm/rbtree

basic: add RB-Tree implementation

8 years agoMerge pull request #2122 from zonque/resolved-mdns-1
Tom Gundersen [Tue, 8 Dec 2015 16:24:09 +0000 (17:24 +0100)] 
Merge pull request #2122 from zonque/resolved-mdns-1

resolved: more mDNS specific bits

8 years agoresolved: add dns_cache_export_to_packet() 2122/head
Daniel Mack [Mon, 30 Nov 2015 23:53:42 +0000 (00:53 +0100)] 
resolved: add dns_cache_export_to_packet()

This new functions exports cached records of type PTR, SRV and TXT into
an existing DnsPacket. This is used in order to fill in known records
to mDNS queries, for known answer supression.

8 years agoresolved: implement query coalescing
Daniel Mack [Mon, 30 Nov 2015 11:47:11 +0000 (12:47 +0100)] 
resolved: implement query coalescing

Implement dns_transaction_make_packet_mdns(), a special version of
dns_transaction_make_packet() for mDNS which differs in many ways:

a) We coalesce queries of currently active transaction on the scope.
   This is possible because mDNS actually allows many questions in a
   to be sent in a single packet and it takes some burden from the
   network.

b) Both A and AAAA query keys are broadcast on both IPv4 and IPv6
   scopes, because other hosts might only respond on one of their
   addresses but resolve both types.

c) We discard previously sent packages (t->sent) so we can start over
   and coalesce pending transactions again.

8 years agoresolved: add 'next_attempt_after' field to DnsTransaction
Daniel Mack [Mon, 30 Nov 2015 21:35:51 +0000 (22:35 +0100)] 
resolved: add 'next_attempt_after' field to DnsTransaction

For each transaction, record when the earliest point in time when the
query packet may hit the wire. This is the same time stamp for which
the timer is scheduled in retries, except for the initial query packets
which are delayed by a random jitter. In this case, we denote that the
packet may actually be sent at the nominal time, without the jitter.

Transactions that share the same timestamp will also have identical
values in this field. It is used to coalesce pending queries in a later
patch.

8 years agoresolved: split dns_transaction_go()
Daniel Mack [Mon, 30 Nov 2015 18:06:36 +0000 (19:06 +0100)] 
resolved: split dns_transaction_go()

Split some code out of dns_transaction_go() so we can re-use it later from
different context. The new function dns_transaction_prepare_next_attempt()
takes care of preparing everything so that a new packet can conditionally
be formulated for a transaction.

This patch shouldn't cause any functional change.

8 years agoresolved: handle more mDNS protocol details
Daniel Mack [Thu, 3 Sep 2015 10:09:11 +0000 (12:09 +0200)] 
resolved: handle more mDNS protocol details

8 years agoresolved: fix debug message
Daniel Mack [Thu, 3 Sep 2015 10:04:31 +0000 (12:04 +0200)] 
resolved: fix debug message

8 years agoresolved: add mDNS packet dispatcher
Daniel Mack [Sat, 11 Jul 2015 00:44:59 +0000 (20:44 -0400)] 
resolved: add mDNS packet dispatcher

Add the packet dispatching routine for mDNS.

It differs to what LLMNR and DNS dispatchers do in the way it matches
incoming packets. In mDNS, we actually handle all incoming packets,
regardless whether we asked for them earlier or not.

8 years agoresolved: allow name compression in NSEC records
Daniel Mack [Tue, 1 Sep 2015 15:17:27 +0000 (17:17 +0200)] 
resolved: allow name compression in NSEC records

8 years agoresolved: handle mDNS timeouts per transaction
Daniel Mack [Fri, 28 Aug 2015 14:48:37 +0000 (16:48 +0200)] 
resolved: handle mDNS timeouts per transaction

mDNS packet timeouts need to be handled per transaction, not per link.
Re-use the n_attempts field for this purpose, as packets timeouts should be
determined by starting at 1 second, and doubling the value on each try.

8 years agoresolved: short-cut jitter callbacks for LLMNR and mDNS
Daniel Mack [Tue, 25 Aug 2015 15:57:58 +0000 (17:57 +0200)] 
resolved: short-cut jitter callbacks for LLMNR and mDNS

When a jitter callback is issued instead of sending a DNS packet directly,
on_transaction_timeout() is invoked to 'retry' the transaction. However,
this function has side effects. For once, it increases the packet loss
counter on the scope, and it also unrefs/refs the server instances.

Fix this by tracking the jitter with two bool variables. One saying that
the initial jitter has been scheduled in the first place, and one that
tells us the delay packet has been sent.

8 years agoresolved: flush keys when DNS_RESOURCE_KEY_CACHE_FLUSH is set
Daniel Mack [Tue, 4 Aug 2015 12:12:46 +0000 (14:12 +0200)] 
resolved: flush keys when DNS_RESOURCE_KEY_CACHE_FLUSH is set

In mDNS, DNS_RESOURCE_KEY_CACHE_FLUSH denotes whether other records with the
same key should be flushed from the cache.

8 years agoresolved: add cache flush flag to DnsResourceKey
Daniel Mack [Tue, 24 Nov 2015 14:45:15 +0000 (15:45 +0100)] 
resolved: add cache flush flag to DnsResourceKey

MDNS has a 'key cache flush' flag for records which must be masked out for
the parsers to do our right thing. We will also use that flag later (in a
different patch) in order to alter the cache behavior.

8 years agoresolved: add mDNS initial jitter
Daniel Mack [Tue, 25 Aug 2015 12:08:29 +0000 (14:08 +0200)] 
resolved: add mDNS initial jitter

The logic is to kick off mDNS packets in a delayed way is mostly identical
to what LLMNR needs, except that the constants are different.

8 years agoresolved: create dns scopes for mDNS
Daniel Mack [Sat, 11 Jul 2015 17:17:51 +0000 (13:17 -0400)] 
resolved: create dns scopes for mDNS

Follow what LLMNR does, and create per-link DnsScope objects.

8 years agoresolved: add code to join/leave mDNS multicast groups
Daniel Mack [Sat, 11 Jul 2015 18:33:58 +0000 (14:33 -0400)] 
resolved: add code to join/leave mDNS multicast groups

Per link, join the mDNS multicast groups when the scope is created, and
leave it again when the scope goes away.

8 years agoresolved: add packet header details for mDNS
Daniel Mack [Sat, 11 Jul 2015 00:44:46 +0000 (20:44 -0400)] 
resolved: add packet header details for mDNS

Validate mDNS queries and responses by looking at some header fields,
add mDNS flags.

8 years agoresolved: add infrastructure for mDNS related sockets
Daniel Mack [Fri, 10 Jul 2015 19:48:13 +0000 (15:48 -0400)] 
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.

8 years agoMerge pull request #2104 from evverx/rlimit-util-test
Zbigniew Jędrzejewski-Szmek [Tue, 8 Dec 2015 04:47:45 +0000 (23:47 -0500)] 
Merge pull request #2104 from evverx/rlimit-util-test

tests: add test-rlimit-util

8 years agoMerge pull request #2117 from evverx/remove-dist-check-python
Zbigniew Jędrzejewski-Szmek [Tue, 8 Dec 2015 04:35:19 +0000 (23:35 -0500)] 
Merge pull request #2117 from evverx/remove-dist-check-python

build-sys: remove dist-check-python

8 years agobuild-sys: remove dist-check-python 2117/head
Evgeny Vereshchagin [Tue, 8 Dec 2015 02:33:52 +0000 (02:33 +0000)] 
build-sys: remove dist-check-python

added: 279419b379
obsoleted: 2c8849add4

8 years agoMerge pull request #2111 from evverx/remove-unnecessary-checking
Filipe Brandenburger [Mon, 7 Dec 2015 21:53:02 +0000 (13:53 -0800)] 
Merge pull request #2111 from evverx/remove-unnecessary-checking

build-sys: remove unnecessary check

8 years agobasic: add RB-Tree implementation 2115/head
David Herrmann [Mon, 7 Dec 2015 17:34:05 +0000 (18:34 +0100)] 
basic: add RB-Tree implementation

This adds an self-standing RB-Tree implementation to src/basic/. This
will be needed for NSEC RR lookups, since we need "close lookups", which
hashmaps (not even ordered-hashmaps) can give us in reasonable time.

8 years agoMerge pull request #2109 from keszybz/udev-null-deref
Martin Pitt [Mon, 7 Dec 2015 16:35:32 +0000 (17:35 +0100)] 
Merge pull request #2109 from keszybz/udev-null-deref

Udev null deref

8 years agotests: disable hard errors 2104/head
Evgeny Vereshchagin [Mon, 7 Dec 2015 09:43:43 +0000 (09:43 +0000)] 
tests: disable hard errors

we don't use it
https://www.gnu.org/software/automake/manual/automake.html#Scripts_002dbased-Testsuites

8 years agotests: add test-rlimit-util
Evgeny Vereshchagin [Sun, 6 Dec 2015 02:04:08 +0000 (02:04 +0000)] 
tests: add test-rlimit-util

8 years agobuild-sys: remove unnecessary check 2111/head
Evgeny Vereshchagin [Mon, 7 Dec 2015 07:02:37 +0000 (07:02 +0000)] 
build-sys: remove unnecessary check

added: 65adc982d
obsoleted: 2c8849add

8 years agoudev/scsi_id: fix some strange indentation 2110/head
Zbigniew Jędrzejewski-Szmek [Mon, 7 Dec 2015 05:30:23 +0000 (00:30 -0500)] 
udev/scsi_id: fix some strange indentation

8 years agoudev: add emacs header line
Zbigniew Jędrzejewski-Szmek [Mon, 7 Dec 2015 05:29:53 +0000 (00:29 -0500)] 
udev: add emacs header line

Otherwise emacs wants to use 2-space indentation and other
attrocities.

8 years agoudev: fix NULL deref when executing rules 2109/head
Zbigniew Jędrzejewski-Szmek [Mon, 7 Dec 2015 05:10:15 +0000 (00:10 -0500)] 
udev: fix NULL deref when executing rules

We quite obviously check whether event->dev_db is nonnull, and
right after that call a function which asserts the same. Move
the call under the same if.

https://bugzilla.redhat.com/show_bug.cgi?id=1283971

8 years agolibudev: simplify udev_device_ensure_usec_initialized a bit
Zbigniew Jędrzejewski-Szmek [Mon, 7 Dec 2015 05:09:12 +0000 (00:09 -0500)] 
libudev: simplify udev_device_ensure_usec_initialized a bit

8 years agoMerge pull request #2095 from evverx/fix-distcheck-for-disable-timesync
Lennart Poettering [Sun, 6 Dec 2015 19:58:11 +0000 (20:58 +0100)] 
Merge pull request #2095 from evverx/fix-distcheck-for-disable-timesync

build-sys: move "dist" parts out of conditional

8 years agoMerge pull request #2100 from msekletar/nologin-label
Lennart Poettering [Sun, 6 Dec 2015 19:57:33 +0000 (20:57 +0100)] 
Merge pull request #2100 from msekletar/nologin-label

user-sessions: make sure /run/nologin has correct SELinux label

8 years agoMerge pull request #2107 from phomes/misc
Lennart Poettering [Sun, 6 Dec 2015 19:49:12 +0000 (20:49 +0100)] 
Merge pull request #2107 from phomes/misc

Misc cleanups

8 years agoMerge pull request #2097 from kinvolk/alban/TasksMax
Lennart Poettering [Sun, 6 Dec 2015 19:48:02 +0000 (20:48 +0100)] 
Merge pull request #2097 from kinvolk/alban/TasksMax

nspawn: set TasksMax in machined instead of nspawn

8 years agoresolve: remove unused variable 2107/head
Thomas Hindoe Paaboel Andersen [Sun, 6 Dec 2015 11:31:18 +0000 (12:31 +0100)] 
resolve: remove unused variable

8 years agoshared: include what we use
Thomas Hindoe Paaboel Andersen [Thu, 3 Dec 2015 20:13:37 +0000 (21:13 +0100)] 
shared: include what we use

The next step of a general cleanup of our includes. This one mostly
adds missing includes but there are a few removals as well.

8 years agonspawn: set TasksMax in machined instead of nspawn 2097/head
Alban Crequy [Tue, 24 Nov 2015 17:14:01 +0000 (18:14 +0100)] 
nspawn: set TasksMax in machined instead of nspawn

https://github.com/systemd/systemd/issues/2016

8 years agologin: make sure /run/nologin has correct SELinux label 2100/head
Michal Sekletar [Fri, 4 Dec 2015 21:29:38 +0000 (22:29 +0100)] 
login: make sure /run/nologin has correct SELinux label

8 years agouser-sessions: make sure /run/nologin has correct SELinux label
Michal Sekletar [Fri, 4 Dec 2015 20:33:42 +0000 (21:33 +0100)] 
user-sessions: make sure /run/nologin has correct SELinux label

8 years agoMerge pull request #2092 from poettering/dnssec2
Tom Gundersen [Fri, 4 Dec 2015 13:22:29 +0000 (14:22 +0100)] 
Merge pull request #2092 from poettering/dnssec2

Second DNSSEC patch set

8 years agobuild-sys: move "dist" parts out of conditional 2095/head
Evgeny Vereshchagin [Fri, 4 Dec 2015 05:48:09 +0000 (05:48 +0000)] 
build-sys: move "dist" parts out of conditional

Fixes:
$ ./autogen.sh
$ ./configure ... --disable-timesyncd
$ make distcheck
...
make[1]: *** No rule to make target 'src/timesync/timesyncd-gperf.gperf', needed by 'src/timesync/timesyncd-gperf.c'.  Stop.

8 years agoMerge pull request #2093 from evverx/add-test-dnssec-to-gitignore
Zbigniew Jędrzejewski-Szmek [Fri, 4 Dec 2015 02:41:53 +0000 (21:41 -0500)] 
Merge pull request #2093 from evverx/add-test-dnssec-to-gitignore

.gitignore: add test-dnssec