Commit Graph

16654 Commits

Author SHA1 Message Date
Lennart Poettering 41414fed51 hostnamectl: actually implement location support 2014-08-15 17:06:30 +02:00
David Herrmann bf32f99f65 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.
2014-08-15 16:59:09 +02:00
David Herrmann 7242d7420b macro: add CONST_MAX() macro
The CONST_MAX() macro is similar to MAX(), but verifies that both
arguments have the same type and are constant expressions. Furthermore,
the result of CONST_MAX() is again a constant-expression.

CONST_MAX() avoids any statement-expressions and other non-trivial
expression-types. This avoids rather arbitrary restrictions in both GCC
and LLVM, which both either fail with statement-expressions inside
type-declarations or statement-expressions inside static-const
initializations.

If anybody knows how to circumvent this, please feel free to unify
CONST_MAX() and MAX().
2014-08-15 16:59:09 +02:00
David Herrmann fdcba430ae macro: const'ify MIN/MAX/... macros
We must add 'const' to local variables in statement-expressions to
guarantee that the macros can produce constant-expressions if given such.
GCC seems to ignore this, but LLVM/clang requires it (understandably).
2014-08-15 16:59:09 +02:00
Lennart Poettering 4de120ee44 resolved: fix assertion when joining llmnr mcast group 2014-08-15 16:42:14 +02:00
Lennart Poettering 40274ed623 networkd: print nice warnings if people configure invalid domain names 2014-08-15 16:21:19 +02:00
Lennart Poettering a0627f82e2 util: make is_localhost() check for 'localdomain' too, so that we can use it for both validating domains and host names 2014-08-15 16:04:46 +02:00
Lennart Poettering 486d1a8148 networkd: fix minor memory leak 2014-08-15 16:02:42 +02:00
Lennart Poettering c627729fc4 networkctl: show acquired system domains 2014-08-15 16:02:29 +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 d5314fff96 networkd: always write out locally configured settings first, dhcp-acquired ones later
This is primarily important for the domains list, as we really should
prefer the locally configured domain over the dhcp supplied ones when we
use it as a search list.
2014-08-15 15:42:56 +02:00
Lennart Poettering f15b6e5a8b networkd: remove "*" from domains list
Also, simplify things a bit and make sure we don't forget looking at one
of the entries.
2014-08-15 15:36:17 +02:00
Lennart Poettering 1405434b69 networkctl: two OOM fixes 2014-08-15 15:34:56 +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 6192b846ca networkd: add support for Domains= to .network files
This allows the search/routing domanis to be specified per link/network and be passed
on to resolved.
2014-08-15 15:15:24 +02:00
Harald Hoyer 2f3a215f61 kernel-install/90-loaderentry.install: fixed cmdline parsing
If /etc/kernel/cmdline is missing or empty, we read /proc/cmdline and
want to filter out the initrd line. Due to a bug, the whole contents was
filtered out.
2014-08-15 14:41:50 +02:00
David Herrmann 926446f4aa test: fix strtod test for real
The "0,5" syntax was actually right. The real problem is, the test should
only run if the local system has the de_DE.UTF-8 locale. Therefore, skip
the tests if setlocale() fails. This is kinda ugly, as it is done
silently, but we cannot skip partial tests with the current
infrastructure. Should be fine this way.
2014-08-15 13:25:15 +02:00
Lennart Poettering db73295acc util: never use ether_ntoa(), since it formats with %x, not %02x, which makes ethernet addresses look funny 2014-08-15 13:19:03 +02:00
Lennart Poettering c22bf27bee unit: remove spurious newline 2014-08-15 13:19:03 +02:00
Lennart Poettering 3e3db0ee86 networkctl: increase column width for link type to 18, to accomodate for 'ieee80211_radiotap' 2014-08-15 13:19:03 +02:00
Tom Gundersen ad0734e890 networkd: rename UseDomainName to UseDomains
This option will also apply to the search domains, so make it plural.
2014-08-15 12:53:34 +02:00
Lennart Poettering 1836bf9e1d sysctl: always write net.ipv4.conf.all.xyz= in addition to net.ipv4.conf.default.xyz=
Otherwise we have a boot-time race, where interfaces that popped up
after the sysctl service would get the settings applied, but all others
wouldn't.
2014-08-15 12:07:33 +02:00
Lennart Poettering 6b2f67b31c cgroup: downgrade log messages about non-existant cgroup attributes to LOG_DEBUG 2014-08-15 11:57:07 +02:00
Lennart Poettering 70c949a42b cgroup: never try to create files in cgroupfs, only open them for writing
This should have the benefit that cg_set_attribute() returns ENOENT
instead of EACCESS when we use it for non-existing attributes.
2014-08-15 11:57:07 +02:00
David Herrmann ce049dcda4 test: fix strtod() test
One strtod() test is broken since:

commit 8e21100002
Author: Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
Date:   Mon Aug 4 23:13:31 2014 +0200

    test: use fabs on doubles

The commit was right, so no reason to revert it, but the test was broken
before and only worked by coincidence. Convert "0,5" to "0.5" so we don't
depend on locales for double conversion (or well, we depend on "C" which
seems reasonable).
2014-08-15 10:44:43 +02:00
Lennart Poettering 2301cb9fdb networkctl: print local domain name in status output 2014-08-15 03:10:20 +02:00
Lennart Poettering 708281b811 dhcp: the localhost isn't valid as hostname either 2014-08-15 03:10:20 +02:00
Umut Tezduyar Lindskog 4d229b318a coredump: display libdw fail string on stack trace fail
- systemd[1]: hello.service: main process exited, code= dumped, status=3/QUIT
- systemd-coredump[2541]: Failed to generate stack trace: Unwinding not supported for this architecture
- systemd-coredump[2541]: Process 1024 (hello) of user 154 dumped core.
2014-08-15 03:10:20 +02:00
Lennart Poettering d0a3fb7556 man: drop references to removed and obsolete 'systemctl load' command 2014-08-15 03:10:20 +02:00
Susant Sahani fd062cd449 socket: add bus property for bus property NoDelay
Missed to add the SD_BUS_PROPERTY for no_delay.
2014-08-14 19:55:44 -04:00
Susant Sahani cc567c9bea socket: Add support for TCP defer accept
TCP_DEFER_ACCEPT Allow a listener to be awakened only when data
arrives on the socket. If TCP_DEFER_ACCEPT set on a server-side
listening socket, the TCP/IP stack will not to wait for the final
ACK packet and not to initiate the process until the first packet
of real data has arrived. After sending the SYN/ACK, the server will
then wait for a data packet from a client. Now, only three packets
will be sent over the network, and the connection establishment delay
will be significantly reduced.
2014-08-14 19:55:44 -04:00
Susant Sahani 209e9dcd7b socket: Add Support for TCP keep alive variables
The tcp keep alive variables now can be configured via conf
parameter. Follwing variables are now supported by this patch.

tcp_keepalive_intvl: The number of seconds between TCP keep-alive probes

tcp_keepalive_probes: The maximum number of TCP keep-alive probes to
send before giving up and killing the connection if no response is
obtained from the other end.

tcp_keepalive_time: The number of seconds a connection needs to be
idle before TCP begins sending out keep-alive probes.
2014-08-14 19:48:57 -04:00
Lennart Poettering 1dbe0a6efd update TODO 2014-08-15 01:35:28 +02:00
Timofey Titovets 5261ba9018 core: Refuse mount on symlink 2014-08-15 01:35:28 +02:00
Tom Gundersen 1bd27a45d0 networkd: don't respect domainname from DHCP by default
Most routers will send garbage, so make this opt-in only.
2014-08-15 01:08:46 +02:00
Tom Gundersen 784d9b9c09 sd-dhcp-lease: verify hostname and domainnames we receive 2014-08-15 01:04:53 +02:00
Tom Gundersen bda2c408f8 resolved: pull in domain names from sd-network 2014-08-14 23:38:38 +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
Eelco Dolstra 9d685ca819 machine_kill(): Don't kill the unit when killing the leader
If "machinectl poweroff" or "machinectl reboot" is used on a
systemd-nspawn container started with --keep-unit and --register, it
should *only* send the appropriate signal to the leader PID (i.e. the
container's systemd process). It shouldn't fall through to
manager_kill_unit() to also send the signal to the unit. The latter
ends up killing systemd-nspawn, which takes down the container
prematurely.
2014-08-14 20:10:33 +02:00
Lennart Poettering 5ba73e9b64 resolved: clarify that LLMNR scopes must have a link assigned
This is supposed to remove some compiler warnings:

http://lists.freedesktop.org/archives/systemd-devel/2014-July/021393.html
2014-08-14 19:56:22 +02:00
Lennart Poettering ca70bec926 update TODO 2014-08-14 19:02:48 +02:00
Jon Severinsson b24de9d21d core: do not add default dependencies to /usr mount unit
This makes no difference if /usr was mounted in the initrd,
and brings the behaviour of legacy systems closer to those
with a propper initrd.
2014-08-14 18:53:32 +02:00
Lennart Poettering e830abd5ff update TODO 2014-08-14 17:16:37 +02:00
Lennart Poettering 58d617429d core: move status line ellipsation to 50% of the line
http://lists.freedesktop.org/archives/systemd-devel/2014-July/021591.html
2014-08-14 17:15:09 +02:00
Lennart Poettering 5dcf983854 update TODO 2014-08-14 16:36:32 +02:00
Lennart Poettering 6a41c9e288 analyze: some fixes to the --help text 2014-08-14 16:36:32 +02:00
Lennart Poettering 4d8ddba9d7 Revert "socket: add support for TCP fast Open"
This reverts commit 9528592ff8.

Apparently TFO is actually the default at least for the server side now.

Also the setsockopt doesn't actually take a bool, but a qlen integer.
2014-08-14 16:36:32 +02:00
Tom Gundersen 9fdaa9925e networkd: link - don't enter LINK_CONFIGURED more than once 2014-08-14 14:13:36 +02:00
Tom Gundersen c6d3b3034a networkd: link - print address lifetime for tracked addresses
This should help in debugging issues with DHCP lease renewal.
2014-08-14 14:07:45 +02:00