1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-27 10:25:37 +03:00
Commit Graph

24468 Commits

Author SHA1 Message Date
Tom Gundersen
4ddbb47472 Merge pull request #2267 from gdamjan/dont-drop-critical
networkd: link - do not drop config for critical interfaces
2016-01-20 17:33:59 +01:00
Beniamino Galvani
2c1ab8ca9b dhcp: make DHCP6_OPTION_* enum public
libsystemd-network provides the public function
sd_dhcp6_client_set_request_option() to enable the request of a given
DHCP option. However the enum defining such options is defined in the
internal header dhcp6-protocol.h. Move the enum definition to the
public header sd-dhcp6-client.h and properly namespace values.
2016-01-20 17:25:16 +01:00
Beniamino Galvani
22805d9207 dhcp: make DHCP_OPTION_* enum public
libsystemd-network provides the public function
sd_dhcp_client_set_request_option() to enable the request of a given
DHCP option. However the enum defining such options is defined in the
internal header dhcp-protocol.h. Move the enum definition to the
public header sd-dhcp-client.h and properly namespace values.
2016-01-20 17:25:16 +01:00
Beniamino Galvani
f8693fc797 dhcp: export routes as opaque objects
At the moment sd_dhcp_lease_get_routes() returns an array of structs
which are not defined in public headers. Instead, change the function
to return an array of pointers to opaque sd_dhcp_route objects.
2016-01-20 17:25:16 +01:00
Lennart Poettering
afd806fc48 Merge pull request #1607 from keszybz/lz4-remove-v1
Remove the old version of the lz4 stream compressor
2016-01-20 17:24:59 +01:00
Lennart Poettering
3b159f328c Merge pull request #2085 from fbuihuu/more-use-of-check-load-state
core: use bus_unit_check_load_state() in transaction_add_job_and_depe…
2016-01-20 17:18:44 +01:00
Daniel Mack
599601a4b9 Merge pull request #2222 from snakeroot/eventsplat
hwdb: remove references to udevadm info /dev/input/event*
2016-01-20 17:06:56 +01:00
Daniel Mack
8347ebc23a Merge pull request #2387 from keszybz/mhd-offset
journal-gatewayd: fix offset
2016-01-20 16:27:23 +01:00
Zbigniew Jędrzejewski-Szmek
da0a9a3305 journal-gatewayd: fix offset
I was checking something when writing the patch and
committed this by mistake.
2016-01-20 10:12:18 -05:00
Lennart Poettering
16bd1e98dd Merge pull request #2385 from zonque/bootctl
bootctl: use DRAW_TREE_RIGHT rather than hard-coded UTF-8 character
2016-01-20 15:44:12 +01:00
Lennart Poettering
a9cb7caba6 Merge pull request #2381 from jsynacek/journalctl-colors-v4
basic/terminal-util: introduce SYSTEMD_COLORS environment variable
2016-01-20 13:44:31 +01:00
Daniel Mack
bc9d55c865 bootctl: use DRAW_TREE_RIGHT rather than hard-coded UTF-8 character
Fixes #2384
2016-01-20 13:14:14 +01:00
Tom Gundersen
f7e29f72bf Merge pull request #2372 from poettering/dnssec17
resolved bus API improvements
2016-01-20 11:30:20 +01:00
Jan Synacek
40c9fe4c08 basic/terminal-util: introduce SYSTEMD_COLORS environment variable
... to determine if color output should be enabled. If the variable is not set,
fall back to using on_tty(). Also, rewrite existing code to use
colors_enabled() where appropriate.
2016-01-20 10:12:41 +01:00
Lennart Poettering
c69fa7e3c4 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.
2016-01-19 21:56:54 +01:00
Lennart Poettering
d2ec6608b9 resolved: add SetLinkXYZ() method counterparts on the Link object
So far, we exposed SetLinkXYZ() on the Manager interface, to set a couple of link properties. This adds similar calls
SetXYZ() on the Link interface, and makes sure the former is little more than a shortcut to the latter.

SetLinkXYZ() has the benefit of not requiring a GetLink() round trip for setting these properties, while the method
actually belongs to the Link objects, and this change corrects that.
2016-01-19 21:56:54 +01:00
Lennart Poettering
0645ce61a0 sd-resolve: use UINT64_C() macros where appropriate 2016-01-19 21:56:54 +01:00
Lennart Poettering
a7f6e7e847 networkd: sd_bus_path_decode() returns 0, if the prefix doesn't match 2016-01-19 21:56:54 +01:00
Lennart Poettering
fdb90ac6a6 networkd: optimize link_node_enumerator() a bit
strv_consume() is pretty expensive when invoked piecemeal, hence optimize it a bit by pre-allocating a properly sized
array.
2016-01-19 21:56:54 +01:00
Lennart Poettering
3abaabdab7 resolved: expose bus objects for each Link
The link objects expose as properties the current settings made with SetLinkDNS() and related calls, plus some more
information.
2016-01-19 21:56:54 +01:00
Daniel Mack
d619a0c4a5 Merge pull request #2373 from keszybz/man-api-build-3
Man page grammar and build tweaks v3
2016-01-19 20:44:58 +01:00
Lennart Poettering
e40f0647b4 resolved: rename a few props to closer match ther counterparts in the various configuration files 2016-01-19 18:37:45 +01:00
Lennart Poettering
97e5d693c0 resolved: add bus API for configuring per-link DNS settings
This is useful for alternative network management solutions (such as NetworkManager) to push DNS configuration data
into resolved.

The calls will fail should networkd already have taken possesion of a link, so that the bus API is only available if
we don't get the data from networkd.
2016-01-19 18:37:45 +01:00
Lennart Poettering
9a81c76848 resolved: add a couple of errors to the error mapping tables
These were previously forgotten, add them now.
2016-01-19 18:37:45 +01:00
Lennart Poettering
dfc1091b2f resolved: allocate DNS scope for links only if the interface is up
For mDNS and LLMNR we already created the scopes only if the specific interfaces where actually up and suitable for
Multicasting. Add a similar (but weaker) logic for unicast DNS as well.
2016-01-19 18:37:45 +01:00
Lennart Poettering
5b91184300 resolve-host: support --interface= as long form for -i 2016-01-19 18:37:45 +01:00
Lennart Poettering
593f665cd5 resolve-host: show whether DNSSEC is supported or not in --statistics output
This should be generally useful information, hence show it.
2016-01-19 18:37:45 +01:00
Lennart Poettering
786c8e9fbc resolve-host: also show mDNS as source of resolving 2016-01-19 18:37:45 +01:00
Zbigniew Jędrzejewski-Szmek
f23e83b156 man/sd_event_{add_io,add_time,add_signal,now}: various small fixes
- remove things which are clear from the context
- 0 is a valid descriptor number, hence "positive" → "non-negative"
- "positive" means greater than zero, hence "positive non-zero" → "positive"
- use oxford comma
- reword some things for clarity
2016-01-19 12:18:24 -05:00
Lennart Poettering
d555eb990b Merge pull request #2369 from zonque/resolved
resolved: hide public mDNS configuration knobs for now
2016-01-19 15:11:10 +01:00
Lennart Poettering
5f0f8d749d Merge pull request #2357 from keszybz/warnings-2
Remove gcc warnings v2
2016-01-19 15:09:53 +01:00
Daniel Mack
60402bdc52 resolved: remove configuration knobs for mDNS until it's ready
These bits were intenionally left out while mDNS is under development.

Remove the exposed knobs and man page entries again until this is settled.
2016-01-19 14:11:05 +01:00
Daniel Mack
b6c5d46b23 resolved: fix mDNS IPv6 multicast address
Fixes #2366
2016-01-19 14:11:05 +01:00
Tom Gundersen
bcbd1d0cd5 Merge pull request #2358 from poettering/dnssec16
sixteenth DNSSEC patch set
2016-01-19 01:44:20 +01:00
Lennart Poettering
cc450722a0 resolved: don't forget about lost OPT and RRSIG when downgrading a feature level
Certain Belkin routers appear to implement a broken DNS cache for A RRs and some others, but implement a pass-thru for
AAAA RRs. This has the effect that we quickly recognize the broken logic of the router when we do an A lookup, but for
AAAA everything works fine until we actually try to validate the request. Given that the validation will necessarily
fail ultimately let's make sure we remember even when downgrading a feature level that OPT or RRSIG was missing.
2016-01-19 00:51:26 +01:00
Lennart Poettering
f009fda92c update DNSSEC TODO 2016-01-18 23:31:29 +01:00
Lennart Poettering
e09f605eec resolved: don't try to print error strings, where errno isn't set 2016-01-18 23:31:29 +01:00
Lennart Poettering
4dd15077f3 resolved: when restarting a transaction pick a new ID
When we restart a transaction because of an incompatible server, pick a new transaction ID.

This should increase compatibility with DNS servers that don't like if they get different requests with the same
transaction ID.
2016-01-18 23:31:29 +01:00
Lennart Poettering
b214dc0f68 resolved: enforce maximum limit on DNS transactions
given that DNSSEC lookups may result in quite a number of auxiliary transactions, let's better be safe than sorry and
also enforce a limit on the number of total transactions, not just on the number of queries.
2016-01-18 23:31:29 +01:00
Lennart Poettering
8f4560c7b9 resolved: add DNAME test case to the complex DNSSEC test 2016-01-18 23:31:16 +01:00
Lennart Poettering
942eb2e71b resolved: fix how we detect whether auxiliary DNSSEC transactions are ready
Previously, when getting notified about a completed auxiliary DNSSEC transaction we'd immediately act on it, and
possibly abort the main transaction. This is problematic, as DNS transactions that already completed at the time we
started using them will never get the notification event, and hence never be acted on in the same way.

Hence, introduce a new call dns_transaction_dnssec_ready() that checks the state of auxiliary DNSSEC transactions, and
returns 1 when we are ready for the actual DNSSEC validation step. Then, make sure this is invoked when the auxiliary
transactions are first acquired (and thus possibly reused) as well when the notifications explained above take place.

This fixes problems particularly when doing combined A and AAAA lookups  where the auxiliary DNSSEC transactions get
reused between them, and where we got confused if we reused an auxiliary DNSSEC transaction from one when it already
got completed from the other.
2016-01-18 23:31:16 +01:00
Lennart Poettering
8ec76e6af5 resolved: end log messages in a full stop 2016-01-18 23:31:16 +01:00
Lennart Poettering
542e0c84d1 resolved: never consider following a CNAME/DNAME chain for a CNAME/DNAME lookup
Let's avoid thinking that a CNAME/DNAME chain traversal could be a good idea if QTYPE is already CNAME/DNAME.

(Also, let's bail out early when trying to see if some RR is a suitable CNAME/DNAME for some other RR).
2016-01-18 23:31:16 +01:00
Lennart Poettering
59a899908f resolved: when following a CNAME, turn off search domains
If the first step was done via a search domain, make sure the subsequent steps are not.
2016-01-18 23:31:16 +01:00
Lennart Poettering
7820b320ea resolved: properly reset old collected data when following a CNAME redirect 2016-01-18 23:31:16 +01:00
Lennart Poettering
12634bb4a9 resolved: beef up complex dnssec test to also use ResolveAddress() and do IDNA checks 2016-01-18 23:31:16 +01:00
Lennart Poettering
23b298bce7 resolved: rework IDNA logic
Move IDNA logic out of the normal domain name processing, and into the bus frontend calls. Previously whenever
comparing two domain names we'd implicitly do IDNA conversion so that "pöttering.de" and "xn--pttering-n4a.de" would be
considered equal. This is problematic not only for DNSSEC, but actually also against he IDNA specs.

Moreover it creates problems when encoding DNS-SD services in classic DNS. There, the specification suggests using
UTF8 encoding for the actual service name, but apply IDNA encoding to the domain suffix.

With this change IDNA conversion is done only:

- When the user passes a non-ASCII hostname when resolving a host name using ResolveHostname()
- When the user passes a non-ASCII domain suffix when resolving a service using ResolveService()

No IDNA encoding is done anymore:

- When the user does raw ResolveRecord() RR resolving
- On the service part of a DNS-SD service name

Previously, IDNA encoding was done when serializing names into packets, at a point where information whether something
is a label that needs IDNA encoding or not was not available, but at a point whether it was known whether to generate a
classic DNS packet (where IDNA applies), or an mDNS/LLMNR packet (where IDNA does not apply, and UTF8 is used instead
for all host names). With this change each DnsQuery object will now maintain two copies of the DnsQuestion to ask: one
encoded in IDNA for use with classic DNS, and one encoded in UTF8 for use with LLMNR and MulticastDNS.
2016-01-18 23:31:16 +01:00
Lennart Poettering
b6800689e0 resolved: minor optimization for dns_question_is_equal()
If the poinetrs are equal, we don't have to do a deep comparison.

This is similar to a similar optimization we already have in place for RRs and keys.
2016-01-18 23:31:16 +01:00
Lennart Poettering
0f7091e624 resolved: be slightly stricter when validating DnsQuestion
Also verify whether the DNS RR types are actually suitable for a question.
2016-01-18 23:31:16 +01:00
Lennart Poettering
6a21960c0b resolved: make key argument of dns_question_contains() const 2016-01-18 23:31:16 +01:00