Commit Graph

28 Commits

Author SHA1 Message Date
Lennart Poettering 3df9bec57c networkd: rework Domains= setting
Previously, .network files only knew a vaguely defined "Domains=" concept, for which the documentation declared it was
the "DNS domain" for the network connection, without specifying what that means.

With this the Domains setting is reworked, so that there are now "routing" domains and "search" domains. The former are
to be used by resolved to route DNS request to specific network interfaces, the latter is to be used for searching
single-label hostnames with (in addition to being used for routing). Both settings are configured in the "Domains="
setting. Normal domain names listed in it are now considered search domains (for compatibility with existing setups),
while those prefixed with "~" are considered routing domains only. To route all lookups to a specific interface the
routing domain "." may be used, referring to the root domain. An alternative syntax for this is the "*", as was already
implemented before using the "wildcard" domain concept.

This commit adds proper parsers for this new logic, and exposes this via the sd-network API. This information is not
used by resolved yet, this will be added in a later commit.
2016-01-26 14:42:03 +01:00
Lennart Poettering 8a516214c4 resolved: introduce support for per-interface negative trust anchors 2016-01-06 18:36:32 +01:00
Lennart Poettering ad6c047561 resolved,networkd: add a per-interface DNSSEC setting
This adds a DNSSEC= setting to .network files, and makes resolved honour
them.
2016-01-05 20:10:31 +01:00
Lennart Poettering aaa297d4e5 networkd,resolved: add a per-interface mdns configuration option 2016-01-05 17:41:41 +01:00
Lennart Poettering 38e5900fc6 sd-network: unify parsing of /run/systemd/netif/links/* string fields 2016-01-05 17:30:43 +01:00
Lennart Poettering 7760171904 util-lib: move inotify-related definitions to fs-util.[ch] 2015-10-27 14:58:05 +01:00
Lennart Poettering b5efdb8af4 util-lib: split out allocation calls into alloc-util.[ch] 2015-10-27 13:45:53 +01:00
Lennart Poettering 6bedfcbb29 util-lib: split string parsing related calls from util.[ch] into parse-util.[ch] 2015-10-27 13:25:55 +01:00
Lennart Poettering 3ffd4af220 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.
2015-10-25 13:19:18 +01:00
Lennart Poettering 07630cea1f 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.
2015-10-24 23:05:02 +02:00
Lennart Poettering 8eb9058dc1 dhcp,network: implement RFC 4833 (DHCP Timezone option)
This one is simply to add: encode the tzdata timezone in the DHCP
options and optionally make use of it.
2015-08-26 20:44:20 +02:00
Susant Sahani 3de1c8ceab sd-network: fix CID 1306198 2015-06-11 14:08:56 +05:30
Tom Gundersen 870395a4d8 sd-network: allow the state dir to be created after the monitor
We now listen for new subdirs of /run/systemd, and /run/systemd/netif in case
/run/systemd/netif/links does not exist.
2015-06-10 20:08:11 +02:00
Tom Gundersen 0b3476266f sd-network: allow NULL in sd_network_monitor_unref
Match rest of codebase, we always allow unref'ing NULL.
2015-06-10 16:34:43 +02:00
Alin Rauta 0d4ad91dd4 networkd: add support for Uplink Failure Detection
Introduce BindCarrier= to indicate the set of links that determine if
the current link should be brought UP or DOWN.

[tomegun: add a bit to commit message]
2015-02-27 13:58:30 -05:00
Thomas Hindoe Paaboel Andersen 2eec67acbb 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.
2015-02-23 23:53:42 +01:00
Thomas Hindoe Paaboel Andersen 0a6f50c0af 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.
2015-02-12 20:47:38 +01:00
Susant Sahani 49699bac94 LLDP: Add support for networkctl 2014-12-19 08:15:05 +05:30
Tom Gundersen adc5b2e2eb sd-network: add _get_network_file api 2014-09-08 15:09:07 +02:00
Lennart Poettering 8612e93653 sd-network: add system-wide sd_network_get_domains() API 2014-08-15 16:02:14 +02:00
Lennart Poettering 31d2e1961a sd-nework: be more careful with error codes, return ENODATA if you lack information 2014-08-15 15:34:33 +02:00
Tom Gundersen 67272d157a sd-network: add support for wildcard domains 2014-08-15 15:15:24 +02:00
Tom Gundersen 9b4d1882ca sd-network: add sd_network_linkg_get_domains()
For now this only exposes the domain name (DHCP Option 15), and not
the search string (DHCP Option 119), which will be implemented in
a follow-up patch.
2014-08-14 23:13:14 +02:00
Tom Gundersen 438ca2bbd4 sd-networkd: rename link_get_state to link_get_setup_state
Suggested by Kay and Lennart.
2014-08-13 22:55:49 +02:00
Tom Gundersen d6731e4c79 sd-network: /_get_link_/_link_get_/
The link is the 'object', so make this in line with our usual naming convention.

Suggested by Kay and Lennart.
2014-08-13 22:37:45 +02:00
Tom Gundersen 8434fd5cf2 sd-network: rename state INITALIZING to PENDING and expose as any other state
This is the state when we are waiting for udev to initialize the device, and waiting for
libudev and rtnl to be in sync. In the future we probably will also be waiting for nl80211.
At this point we do not yet have enough information to know whether or not networkd should
be handling the device.
2014-08-13 15:39:57 +02:00
Lennart Poettering 03cc0fd143 sd-network: add API to output all collected system-wide NTP and DNS servers
Also, output the collected information in "networkctl".
2014-08-12 15:06:51 +02:00
Lennart Poettering a903fd34c0 sd-network: move sd-network API into libsystemd proper
In contrast to the DHCP/IPv4LL/ICMP6 APIs sd-network is not a protocol
implementation but a client API for networkd, hence move it into
libsystemd proper.
2014-08-12 02:12:05 +02:00
Renamed from src/network/sd-network.c (Browse further)