1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-13 23:21:08 +03:00
Commit Graph

11 Commits

Author SHA1 Message Date
Tom Gundersen
85b5673b33 networkd: split runtime config dir from state dir
Configuration will be in

root:root /run/systemd/network

and state will be in

systemd-network:systemd-network /run/systemd/netif

This matches what we do for logind's seat/session state.
2014-06-03 18:58:00 +02:00
Tom Gundersen
68baa8faf3 sd-network: avoid false positive compiler warning caused by LTO
Djalal Harouni <tixxdz@opendz.org>:
There is also this one genrated by LTO, IMO it's a false positive since
we do *check* for "lease" but the code is not consistent since in that
code path, "lease" is initialized to NULL in other places, except for
this one:

src/resolve/resolved-manager.c: In function 'manager_update_resolv_conf':
src/libsystemd-network/sd-dhcp-lease.c:67:18: warning: 'lease' may be used uninitialized in this function [-Wmaybe-uninitialized]
        if (lease->dns_size) {
                 ^
src/network/sd-network.c:146:24: note: 'lease' was declared here
        sd_dhcp_lease *lease;
                       ^
2014-05-24 00:46:30 +02:00
Tom Gundersen
bcb7a07e0a networkd/sd-network: expose statically configured NTP servers 2014-05-19 18:42:14 +02:00
Tom Gundersen
81d98a39eb sd-dhcp-lease/sd-network: modernization and fix leak 2014-05-19 18:14:56 +02:00
Tom Gundersen
7dbf94a9c4 sd-network: expose DNS information 2014-05-19 18:14:56 +02:00
Tom Gundersen
bbf7c04821 sd-network: expose global operational state 2014-05-08 17:21:37 +02:00
Tom Gundersen
deb2e5230b sd-network: expose both admin and operational state directly
Also add a call to check if a link is loopback, as this should commonly be ignored.
2014-05-07 16:54:02 +02:00
Tom Gundersen
7e141e498c sd-network: add support for only listening to some types of changes 2014-04-30 00:05:28 +02:00
Lennart Poettering
03e334a1c7 util: replace close_nointr_nofail() by a more useful safe_close()
safe_close() automatically becomes a NOP when a negative fd is passed,
and returns -1 unconditionally. This makes it easy to write lines like
this:

        fd = safe_close(fd);

Which will close an fd if it is open, and reset the fd variable
correctly.

By making use of this new scheme we can drop a > 200 lines of code that
was required to test for non-negative fds or to reset the closed fd
variable afterwards.
2014-03-18 19:31:34 +01:00
Tom Gundersen
cb6fa44cb5 sd-network: turn states 'unknown' and 'unmanaged' into errnos 2014-02-28 02:08:08 +01:00
Tom Gundersen
fe8db0c5ee sd-network: add new library
This is similar to sd-login, but exposes the state of networkd rather than logind.

Include it in libsystemd-dhcp and rename it to libsystemd-network.
2014-02-28 01:01:13 +01:00