Dan Streetman [Sun, 29 Sep 2019 21:16:55 +0000 (17:16 -0400)]
src/core/automount: use DirectoryMode when calling mkdir -p
mkdir -p is called both when setting up the autofs mount, as well
as after being notified that the real mount unit should be called.
However the first mkdir -p is hardcoded with 0555, while the second
uses the value specified to DirectoryMode in the automount unit; the
second mkdir -p is only needed when called from coldplug, so under
normal operation the dirs are incorrectly created with mode 0555.
This replaces the hardcoded 0555 mode with the value of DirectoryMode.
Closes #13683.
Yu Watanabe [Thu, 26 Sep 2019 12:33:59 +0000 (21:33 +0900)]
udevadm trigger: do not propagate EACCES and ENODEV
Inside container, writing file returns EACCESS. Moreover, some devices
return ENODEV rather than EACCES. So, let's also ignore these two
error causes.
Closes #13652.
Frantisek Sumsal [Sat, 21 Sep 2019 15:48:50 +0000 (17:48 +0200)]
basic: fix ASSERT_SIDE_EFFECT Coverity report in assert_se()
Chris Down [Wed, 2 Oct 2019 09:42:53 +0000 (10:42 +0100)]
Merge pull request #13691 from mrc0mmand/coverity-fixes
Coverity fixes for unchecked return values
Jonas Thelemann [Wed, 2 Oct 2019 00:42:58 +0000 (02:42 +0200)]
hwdb: Correct WWWW Pattern In Documentation Comment
Zbigniew Jędrzejewski-Szmek [Fri, 27 Sep 2019 12:17:41 +0000 (14:17 +0200)]
nspawn: rename UNIFIED_CGROUP_HIERARCHY to SYSTEMD_NSPAWN_UNIFIED_HIERARCHY
We should never have used an unprefixed environment variable name.
All other systemd-nspawn variables have the "SYSTEMD_NSPAWN_" prefix,
and all other systemd variables have the "SYSTEMD_" prefix.
The new variable name takes precedence, but we fall back to checking the
old one. If only the old one is found, a warning is emitted.
In addition, SYSTEMD_NSPAWN_UNIFIED_HIERARCHY="" is accepted as an override
to avoid looking for the old variable name.
We have a variable with the same name ($UNIFIED_CGROUP_HIERARCHY) in tests,
which governs both systemd-nspawn and qemu behaviour. It is not renamed.
Zbigniew Jędrzejewski-Szmek [Fri, 27 Sep 2019 11:58:06 +0000 (13:58 +0200)]
nspawn: consistenly fail if parsing the environment fails
We would parse the environment twice (to re-apply settings after reading
config from disk), but we would not check the return code first time.
This means that for some settings we would ignore invalid values, while
for others, we'd fail at some point.
Let's just consistently fail. Those environment variables define important
aspects of behaviour, and it is better for the user if we ignore invalid
values. (Unknown settings are still ignored, so forward compatibility is
maintained.)
Zbigniew Jędrzejewski-Szmek [Fri, 27 Sep 2019 12:51:53 +0000 (14:51 +0200)]
nspawn: default to unified hierarchy if --as-pid2 is used
See comment added in the patch.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1756143.
Susant Sahani [Wed, 25 Sep 2019 03:14:12 +0000 (05:14 +0200)]
network: DHCPv6 client add support for prefix delegation hint
Add support for prefix hint lenth and prefix hint address
```
Frame 43: 177 bytes on wire (1416 bits), 177 bytes captured (1416 bits) on interface 0
Ethernet II, Src: f6:c1:08:4d:45:f1 (f6:c1:08:4d:45:f1), Dst: IPv6mcast_01:00:02 (33:33:00:01:00:02)
Internet Protocol Version 6, Src: fe80::d250:c82:7f6e:28d6, Dst: ff02::1:2
User Datagram Protocol, Src Port: 546, Dst Port: 547
DHCPv6
Message type: Solicit (1)
Transaction ID: 0x5c7902
Rapid Commit
Identity Association for Non-temporary Address
Fully Qualified Domain Name
Identity Association for Prefix Delegation
Option: Identity Association for Prefix Delegation (25)
Length: 41
Value: 1b97b1690000000000000000001a0019ffffffffffffffff…
IAID:
1b97b169
T1: 0
T2: 0
IA Prefix
Option: IA Prefix (26)
Length: 25
Value: ffffffffffffffff3c000000000000000000000000000000…
Preferred lifetime: infinity
Valid lifetime: infinity
Prefix length: 60
Prefix address: ::
Option Request
Client Identifier
Elapsed time
```
Jay Strict [Thu, 26 Sep 2019 13:54:29 +0000 (15:54 +0200)]
cryptsetup: bump minimum libcryptsetup version to v2.0.1
libcryptsetup v2.0.1 introduced new API calls, supporting 64 bit wide
integers for `keyfile_offset`. This change invokes the new function
call, gets rid of the warning that was added in #7689, and removes
redundant #ifdefery and constant definitions.
See https://gitlab.com/cryptsetup/cryptsetup/issues/359.
Fixes #7677.
Frantisek Sumsal [Tue, 1 Oct 2019 08:25:36 +0000 (10:25 +0200)]
execute: explicitly ignore fd_wait_for_event()'s return value
Fixes CID#1402316
Frantisek Sumsal [Tue, 1 Oct 2019 08:14:10 +0000 (10:14 +0200)]
sd-event: explicitly ignore waitipid()'s return value
Fixes CID#1393252
Chris Down [Tue, 1 Oct 2019 02:08:15 +0000 (03:08 +0100)]
Merge pull request #13689 from cdown/default_memory_min
cgroup: A bunch of protection-related fixes
Chris Down [Mon, 30 Sep 2019 17:36:13 +0000 (18:36 +0100)]
cgroup: Mark memory protections as explicitly set in transient units
A later version of the DefaultMemory{Low,Min} patch changed these to
require explicitly setting memory_foo_set, but we only set that in
load-fragment, not dbus-cgroup.
Without these, we may fall back to either DefaultMemoryFoo or
CGROUP_LIMIT_MIN when we really shouldn't.
Anita Zhang [Mon, 30 Sep 2019 21:00:38 +0000 (14:00 -0700)]
Merge pull request #13687 from cdown/cgroupv2_docs
cgroup: minor doc improvements
Chris Down [Mon, 30 Sep 2019 17:25:09 +0000 (18:25 +0100)]
cgroup: Respect DefaultMemoryMin when setting memory.min
This is an oversight from https://github.com/systemd/systemd/pull/12332.
Sadly the tests didn't catch it since it requires a real cgroup
hierarchy to see, and it wasn't seen in prod since we're only currently
using DefaultMemoryLow, not DefaultMemoryMin. :-(
Chris Down [Mon, 30 Sep 2019 17:24:26 +0000 (18:24 +0100)]
cgroup: Check ancestor memory min for unified memory config
Otherwise we might not enable it when we should, ie. DefaultMemoryMin is
set in a parent, but not MemoryMin in the current unit.
Kenneth D'souza [Mon, 30 Sep 2019 10:31:21 +0000 (16:01 +0530)]
Consider smb3 as remote filesystem
Currently systemd will treat smb3 as local filesystem and cause
can't boot failures. Add smb3 to the list of remote filesystems
to fix this issue.
Signed-off-by: Kenneth D'souza <kdsouza@redhat.com>
Chris Down [Mon, 30 Sep 2019 13:25:14 +0000 (14:25 +0100)]
cgroup: docs: memory.high doc fixups
The docs just tautologically call this the "high limit". Just call it
throttling as we do in cgroup-v2.rst.
Chris Down [Mon, 30 Sep 2019 13:23:32 +0000 (14:23 +0100)]
cgroup: docs: Mention unbounded protection for memory.{low,min}
I got asked why Memory{Low,Min} don't allow "infinity". They do, but the
docs don't say that like they already do for Memory{High,Max}.
Michael Olbrich [Sun, 29 Sep 2019 11:43:00 +0000 (13:43 +0200)]
Handle d_type == DT_UNKNOWN correctly
As documented in the man-page, readdir() may return a directory entry with
d_type == DT_UNKNOWN. This must be handled for regular filesystems.
dirent_ensure_type() is available to set d_type if necessary. Use it in
some more places.
Without this systemd will fail to boot correctly with nfsroot and some
other filesystems.
Closes #13609
Frantisek Sumsal [Thu, 26 Sep 2019 21:29:38 +0000 (23:29 +0200)]
test: allow use of nested KVM
Introduce TEST_NESTED_KVM variable, which allows use of nested KVM for
QEMU VMs (which is disabled by default by KVM autodetection).
Anita Zhang [Fri, 27 Sep 2019 16:39:10 +0000 (09:39 -0700)]
Merge pull request #13651 from cdown/find_binary_2
util-lib: Don't propagate EACCES from find_binary PATH lookup to caller
Frantisek Sumsal [Thu, 26 Sep 2019 13:13:21 +0000 (15:13 +0200)]
shared: fix a copy-paste error in ethtool-util
CID#1405818
Chris Down [Wed, 25 Sep 2019 16:09:38 +0000 (17:09 +0100)]
util-lib: Don't propagate EACCES from find_binary PATH lookup to caller
On one of my test machines, test-path-util was failing because the
find_binary("xxxx-xxxx") was returning -EACCES instead of -ENOENT. This
happens because the PATH entry on that host contains a directory which
the user in question doesn't have access to. Typically applications
ignore permission errors when searching through PATH, for example in
bash:
$ whoami
cdown
$ PATH=/root:/bin type sh
sh is /bin/sh
This behaviour is present on zsh and other shells as well, though. This
patch brings our PATH search behaviour closer to other major Unix tools.
Siddharth Chandrasekara [Mon, 23 Sep 2019 11:25:21 +0000 (04:25 -0700)]
dhcp4: make IPServiceType configurable
IPServiceType set to CS6 (network control) causes problems on some old
network setups that continue to interpret the field as IP TOS.
Make DHCP work on such networks by allowing this field to be set to
CS4 (Realtime) instead, as this maps to IPTOS_LOWDELAY.
Signed-off-by: Siddharth Chandrasekaran <csiddharth@vmware.com>
Yu Watanabe [Wed, 25 Sep 2019 15:21:00 +0000 (00:21 +0900)]
network: drop noisy log message
Closes #13595.
Yu Watanabe [Wed, 25 Sep 2019 15:12:20 +0000 (00:12 +0900)]
Merge pull request #13649 from keszybz/arphrd-minimization
Arphrd minimization
cbzxt [Wed, 25 Sep 2019 15:02:46 +0000 (20:32 +0530)]
Updated log message when the timesync happens for the first time (#13624)
Zbigniew Jędrzejewski-Szmek [Wed, 18 Sep 2019 10:01:41 +0000 (12:01 +0200)]
units: make systemd-binfmt.service easier to work with no autofs
See https://bugzilla.redhat.com/show_bug.cgi?id=1731772:
when autofs4 is disabled in the kernel,
proc-sys-fs-binfmt_misc.automount is not started, so the binfmt_misc module is
never loaded. If we added a dependency on proc-sys-fs-binfmt_misc.mount
to systemd-binfmt.service, things would work even if autofs4 was disabled, but
we would unconditionally pull in the module and mount, which we don't want to do.
(Right now we ony load the module if some binfmt is configured.)
But let's make it easier to handle this case by doing two changes:
1. order systemd-binfmt.service after the .mount unit (so that the .service
can count on the mount if both units are pulled in, even if .automount
is skipped)
2. add [Install] section to the service unit. This way the user can do
'systemctl enable proc-sys-fs-binfmt_misc.mount' to get the appropriate behaviour.
Zbigniew Jędrzejewski-Szmek [Wed, 25 Sep 2019 10:14:07 +0000 (12:14 +0200)]
basic/arphrd: stop discriminating against NETROM and CISCO
ARPHRD_NETROM was excluded, most likely just because it is protocol No. 0,
and ARPHRD_CISCO was reported under its alias name "HDLC". Let's just
allow defined aliases under the main name.
Zbigniew Jędrzejewski-Szmek [Wed, 25 Sep 2019 10:06:05 +0000 (12:06 +0200)]
basic: massively reduce the size of arphdr lookup functions
Our biggest object in libsystemd was a table full of zeros, for the arphdr
names. Let's use a switch (which gcc nicely optimizes for us), instead a
table with a gap between 826 and 65534:
$ ls -l build{,2}/src/basic/a6ba3eb@@basic@sta/arphrd-list.c.o
-rw-rw-r--. 1 zbyszek zbyszek 540232 Sep 22 00:29 build/src/basic/a6ba3eb\@\@basic\@sta/arphrd-list.c.o
-rw-rw-r--. 1 zbyszek zbyszek 20512 Sep 25 11:56 build2/src/basic/a6ba3eb\@\@basic\@sta/arphrd-list.c.o
$ ls -l build{,2}/src/shared/libsystemd-shared-243.so
-rwxrwxr-x. 1 zbyszek zbyszek 6774368 Sep 22 00:29 build/src/shared/libsystemd-shared-243.so
-rwxrwxr-x. 1 zbyszek zbyszek 6254808 Sep 25 12:16 build2/src/shared/libsystemd-shared-243.so
No functional change.
Chris Down [Wed, 25 Sep 2019 09:41:03 +0000 (11:41 +0200)]
Merge pull request #13648 from evverx/unbreak-semaphore
semaphore: turn on systemd-networkd in lxc-containers on Semaphore
Zbigniew Jędrzejewski-Szmek [Wed, 25 Sep 2019 09:39:10 +0000 (11:39 +0200)]
test-arphdr-list: modernize and provide some useful output
Chris Down [Wed, 25 Sep 2019 09:32:20 +0000 (11:32 +0200)]
Merge pull request #13636 from traylenator/manpage
Corect man page reference in systemd-nologin.conf comments
Chris Down [Wed, 25 Sep 2019 09:24:11 +0000 (11:24 +0200)]
Merge pull request #13641 from pwithnall/machinectl-docs-typo
man: Add a missing space in machinectl(1)
Filipe Brandenburger [Tue, 24 Sep 2019 22:31:27 +0000 (15:31 -0700)]
log: Add missing "%" in "%m" log format strings
These were clearly intended to be "%m" to display the human readable version
of the error stored in errno.
Evgeny Vereshchagin [Wed, 25 Sep 2019 05:19:12 +0000 (05:19 +0000)]
semaphore: turn on systemd-networkd in lxc-containers on Semaphore
It appears networking.service has broken down on Debian Buster.
Chris Down [Tue, 24 Sep 2019 19:57:06 +0000 (21:57 +0200)]
Merge pull request #13481 from Antique/cgroupv2
cgroup: introduce support for cgroup v2 CPUSET controller
Philip Withnall [Tue, 24 Sep 2019 15:07:23 +0000 (16:07 +0100)]
man: Add a missing space in machinectl(1)
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Susant Sahani [Mon, 23 Sep 2019 14:51:02 +0000 (16:51 +0200)]
link: Add support to configure NIC ring buffer size
Zbigniew Jędrzejewski-Szmek [Tue, 24 Sep 2019 13:21:47 +0000 (15:21 +0200)]
test-mountpoint-util: improve output a bit
Pavel Hrdina [Tue, 10 Sep 2019 07:09:46 +0000 (09:09 +0200)]
cgroup-util: fix obsolete comment about supported controllers
The list might grow so make the comment more generic to not worry about
it if some controller is implemented.
Pavel Hrdina [Mon, 29 Jul 2019 15:50:05 +0000 (17:50 +0200)]
cgroup: introduce support for cgroup v2 CPUSET controller
Introduce support for configuring cpus and mems for processes using
cgroup v2 CPUSET controller. This allows users to limit which cpus
and memory NUMA nodes can be used by processes to better utilize
system resources.
The cgroup v2 interfaces to control it are cpuset.cpus and cpuset.mems
where the requested configuration is written. However, it doesn't mean
that the requested configuration will be actually used as parent cgroup
may limit the cpus or mems as well. In order to reflect the real
configuration cgroup v2 provides read-only files cpuset.cpus.effective
and cpuset.mems.effective which are exported to users as well.
Steve Traylen [Tue, 24 Sep 2019 07:48:03 +0000 (09:48 +0200)]
Corect man page reference in systemd-nologin.conf comments
The reference to the man page of `systemd-user-sessions.service`
in the comments of `tmpfiles.d/systemd-nologin.conf` is corrected.
Lennart Poettering [Mon, 23 Sep 2019 10:59:09 +0000 (12:59 +0200)]
Merge pull request #13600 from keszybz/ratelimit
Clean up ratelimit functions and disable /dev/kmsg ratelimit
Yu Watanabe [Sun, 22 Sep 2019 05:44:23 +0000 (07:44 +0200)]
Merge pull request #11883 from yuwata/network-dhcp-renew
network: dhcp renew
Yu Watanabe [Sun, 22 Sep 2019 05:18:28 +0000 (07:18 +0200)]
Merge pull request #13610 from yuwata/network-check-one-more-section
network: assorted follow-ups
Michael Biebl [Sat, 21 Sep 2019 15:06:25 +0000 (17:06 +0200)]
man: fix typo
Frantisek Sumsal [Sat, 21 Sep 2019 14:01:14 +0000 (16:01 +0200)]
tree-wide: various code-formatting improvements
Reported/found by Coccinelle
Yu Watanabe [Thu, 18 Jul 2019 13:26:49 +0000 (22:26 +0900)]
networkctl: add renew command
Yu Watanabe [Mon, 4 Mar 2019 08:54:48 +0000 (17:54 +0900)]
network: introduce new bus method Renew() and RenewLink()
Yu Watanabe [Thu, 19 Sep 2019 06:20:00 +0000 (15:20 +0900)]
network: add one more section validty check
Follow-up for
203d4df5732b1fdcf50db498ddeb74a934b21f87.
Yu Watanabe [Sat, 21 Sep 2019 11:15:06 +0000 (20:15 +0900)]
po: update Japanese translations
Follow-up for
ea2552639b22004c89df26f2374e3d3f1d2acace.
AsciiWolf [Thu, 19 Sep 2019 13:36:42 +0000 (15:36 +0200)]
l10n: update Czech Translation
Chris Down [Fri, 20 Sep 2019 16:10:34 +0000 (18:10 +0200)]
Merge pull request #13605 from cdown/ono
Fixes for recent SIP work
Zbigniew Jędrzejewski-Szmek [Thu, 19 Sep 2019 16:01:23 +0000 (18:01 +0200)]
basic/log: put a ratelimit on our logging to /dev/kmsg
See the inline comment for details.
Zbigniew Jędrzejewski-Szmek [Wed, 18 Sep 2019 19:02:07 +0000 (21:02 +0200)]
pid1: disable printk ratelimit in early boot
We have the problem that many early boot or late shutdown issues are harder
to solve than they could be because we have no logs. When journald is not
running, messages are redirected to /dev/kmsg. It is also the time when many
things happen in a rapid succession, so we tend to hit the kernel printk
ratelimit fairly reliably. The end result is that we get no logs from the time
where they would be most useful. Thus let's disable the kernels ratelimit.
Once the system is up and running, the ratelimit is not a problem. But during
normal runtime, things also log to journald, and not to /dev/kmsg, so the
ratelimit is not useful. Hence, there doesn't seem to be much point in trying
to restore the ratelimit after boot is finished and journald is up and running.
See kernel's commit
750afe7babd117daabebf4855da18e4418ea845e for the
description of the kenrel interface. Our setting has lower precedence than
explicit configuration on the kenrel command line.
Zbigniew Jędrzejewski-Szmek [Thu, 19 Sep 2019 15:49:14 +0000 (17:49 +0200)]
tree-wide: say "ratelimit" not "rate_limit"
"ratelimit" is a real word, so we don't need to use the other form anywhere.
We had both forms in various places, let's standarize on the shorter and more
correct one.
Zbigniew Jędrzejewski-Szmek [Thu, 19 Sep 2019 15:45:41 +0000 (17:45 +0200)]
pid1: rename start_limit to start_ratelimit
This way it is clearer what the type is. We also have auto_stop_ratelimit adjacent,
and it feels ugly to have a different suffix for those two.
Zbigniew Jędrzejewski-Szmek [Thu, 19 Sep 2019 15:41:20 +0000 (17:41 +0200)]
Drop RATELIMIT macros
Using plain structure initialization is both shorter _and_ more clearer.
We get type safety for free.
Georg Müller [Fri, 20 Sep 2019 08:23:45 +0000 (10:23 +0200)]
sd-radv: if lifetime < SD_RADV_DEFAULT_MAX_TIMEOUT_USEC, adjust timeout (#13491)
The RFC states that lifetime (AdvDefaultLifetime) must be at least
MaxRtrAdvInterval (which more or less corresponds to SD_RADV_DEFAULT_MAX_TIMEOUT_USEC
in systemd).
To fulfill this limit, virtually lower MaxRtrAdvInterval and MinRtrAdvInterval
accordingly.
Also check that min is not lower than 3s and max is not lower than 4s.
Chris Down [Fri, 20 Sep 2019 13:14:05 +0000 (15:14 +0200)]
networkd: Fix SIP double-free
This is already strv_freed right above
Chris Down [Fri, 20 Sep 2019 13:13:00 +0000 (15:13 +0200)]
dhcp: Log SIP server information correctly
Susant Sahani [Wed, 18 Sep 2019 13:22:47 +0000 (15:22 +0200)]
network: DHCP server Add support to transmit SIP server
1. DHCP server trasmit
2. Client parses and saves in leases
Implements http://www.rfc-editor.org/rfc/rfc3361.txt
```
Frame 134: 348 bytes on wire (2784 bits), 348 bytes captured (2784 bits) on interface 0
Ethernet II, Src: 42:65:85:d6:4e:32 (42:65:85:d6:4e:32), Dst: 1e:04:f8:b8:2f:d4 (1e:04:f8:b8:2f:d4)
Internet Protocol Version 4, Src: 192.168.5.1, Dst: 192.168.5.11
User Datagram Protocol, Src Port: 67, Dst Port: 68
Dynamic Host Configuration Protocol (ACK)
Message type: Boot Reply (2)
Hardware type: Ethernet (0x01)
Hardware address length: 6
Hops: 0
Transaction ID: 0x7cc87cb4
Seconds elapsed: 0
Bootp flags: 0x0000 (Unicast)
Client IP address: 0.0.0.0
Your (client) IP address: 192.168.5.11
Next server IP address: 0.0.0.0
Relay agent IP address: 0.0.0.0
Client MAC address: 1e:04:f8:b8:2f:d4 (1e:04:f8:b8:2f:d4)
Client hardware address padding:
00000000000000000000
Server host name not given
Boot file name not given
Magic cookie: DHCP
Option: (53) DHCP Message Type (ACK)
Length: 1
DHCP: ACK (5)
Option: (51) IP Address Lease Time
Length: 4
IP Address Lease Time: (3600s) 1 hour
Option: (1) Subnet Mask (255.255.255.0)
Length: 4
Subnet Mask: 255.255.255.0
Option: (3) Router
Length: 4
Router: 192.168.5.1
Option: (6) Domain Name Server
Length: 4
Domain Name Server: 192.168.5.1
Option: (42) Network Time Protocol Servers
Length: 4
Network Time Protocol Server: 192.168.1.1
Option: (120) SIP Servers <=====here
Length: 9
SIP Server Encoding: IPv4 Address (1)
SIP Server Address: 192.168.1.1
SIP Server Address: 192.168.5.2
Option: (101) TCode
Length: 13
TZ TCode: Europe/Berlin
Option: (54) DHCP Server Identifier (192.168.5.1)
Length: 4
DHCP Server Identifier: 192.168.5.1
Option: (255) End
Option End: 255
```
```
cat /run/systemd/netif/state ✔ ⚡ 3148 16:40:51
OPER_STATE=routable
CARRIER_STATE=carrier
ADDRESS_STATE=routable
DNS=192.168.94.2 192.168.5.1
NTP=192.168.5.1
SIP=192.168.1.1 192.168.5.2
```
aa
Susant Sahani [Tue, 17 Sep 2019 12:49:22 +0000 (14:49 +0200)]
network dhcp4: Add support send request options in a generic manner
AsciiWolf [Thu, 19 Sep 2019 12:34:31 +0000 (14:34 +0200)]
polkit: fix typo
Susant Sahani [Wed, 18 Sep 2019 12:14:15 +0000 (14:14 +0200)]
test-network: Drop start dnsmasq
Yu Watanabe [Wed, 18 Sep 2019 13:14:45 +0000 (22:14 +0900)]
dhcp6: use unaligned_read_be32()
Closes #13591.
Zbigniew Jędrzejewski-Szmek [Wed, 18 Sep 2019 15:52:30 +0000 (17:52 +0200)]
pid1: do not warn if /run/systemd/relabel-extra.d/ doesn't exist
After all, that is the expected state.
Yu Watanabe [Tue, 17 Sep 2019 23:15:01 +0000 (08:15 +0900)]
Merge pull request #13582 from yuwata/udevadm-reload
udevadm: use 'udevadm control' to reload udevd
Yu Watanabe [Tue, 17 Sep 2019 23:09:48 +0000 (08:09 +0900)]
Merge pull request #13583 from keszybz/networkd-hash-compare-equality
Networkd hash compare equality
Yu Watanabe [Tue, 17 Sep 2019 13:18:49 +0000 (22:18 +0900)]
dhcp6: add missing option length check
Closes #13578.
Frantisek Sumsal [Tue, 17 Sep 2019 17:42:26 +0000 (17:42 +0000)]
Merge pull request #13577 from yuwata/network-fix-ci-failure
network: fix CI failure
Zbigniew Jędrzejewski-Szmek [Tue, 17 Sep 2019 17:27:58 +0000 (19:27 +0200)]
networkd: unbreak routing_policy_rule_compare_func()
!r is the same r == 0, so this was short-circuiting the comparison when
streq(a->iff, b->iff) or streq(a->off, b->off). Before the parent commit which
moved those comparisons to the end, this was short-circuiting quite a bit
of the comparison function.
Zbigniew Jędrzejewski-Szmek [Tue, 17 Sep 2019 17:20:21 +0000 (19:20 +0200)]
Merge pull request #13508 from yuwata/network-route-fix-13506
network: takes more route information into hash func
Zbigniew Jędrzejewski-Szmek [Tue, 17 Sep 2019 17:13:09 +0000 (19:13 +0200)]
networkd: make neighbor_hash_func() handle the same data as neighbor_compare_func()
In practice this probably makes little difference, because we only use AF_INET
and AF_INET6, but it's cleaner to use the same logic in both places.
Zbigniew Jędrzejewski-Szmek [Tue, 17 Sep 2019 17:11:31 +0000 (19:11 +0200)]
networkd: use same order in _hash_func() and _compare_func()
This makes it easier to see that the same data is handled in both cases.
No functional change.
Zbigniew Jędrzejewski-Szmek [Tue, 17 Sep 2019 17:09:57 +0000 (19:09 +0200)]
networkd: split out helper function for address extraction
Yu Watanabe [Tue, 17 Sep 2019 16:32:46 +0000 (01:32 +0900)]
unit: add ExecReload= in systemd-udevd.service
Yu Watanabe [Tue, 17 Sep 2019 16:28:23 +0000 (01:28 +0900)]
udevadm: use usec_add()
Also fixes description of event source.
Yu Watanabe [Tue, 17 Sep 2019 15:52:07 +0000 (00:52 +0900)]
udevadm: missing initialization of descriptor
Anita Zhang [Wed, 21 Aug 2019 00:39:38 +0000 (17:39 -0700)]
core: add ExecXYZEx= bus hook ups to all exec command properties
The "Ex" variant was originally only added for ExecStartXYZ= but it makes
sense to have feature parity for the rest of the exec command properties
as well (e.g. ExecReload=, ExecStop=, etc).
Frantisek Sumsal [Tue, 17 Sep 2019 10:22:19 +0000 (12:22 +0200)]
test: rename TEST-EXECRELOAD to avoid name conflict
Yu Watanabe [Tue, 17 Sep 2019 15:13:08 +0000 (00:13 +0900)]
Merge pull request #13559 from ssahani/ipv6ra-route
network: make networkd able to advertise IPv6 routes on links
ypf791 [Fri, 19 Jul 2019 10:28:04 +0000 (18:28 +0800)]
core: coldplug possible nop_job
Yu Watanabe [Mon, 9 Sep 2019 15:18:05 +0000 (00:18 +0900)]
network: also take Route::initcwnd and ::initrwnd into hash func
Fixes #13506.
Yu Watanabe [Mon, 9 Sep 2019 15:17:28 +0000 (00:17 +0900)]
network: take more route information into hash func
Yu Watanabe [Mon, 9 Sep 2019 15:16:41 +0000 (00:16 +0900)]
network: make route_get() or friends take Route object
Yu Watanabe [Sun, 15 Sep 2019 13:50:36 +0000 (22:50 +0900)]
sd-netlink: fix invalid assertion
It is natural that n_attiributes is less than type. But in that case,
the message does not contain any message about the type. So, we should
not abort execution with assertion, but just return -ENODATA.
Yu Watanabe [Tue, 17 Sep 2019 12:41:38 +0000 (21:41 +0900)]
Merge pull request #13567 from keszybz/logind-two-refactoring-patches
Logind two refactoring patches
Yu Watanabe [Tue, 17 Sep 2019 12:34:06 +0000 (21:34 +0900)]
network: do not enter failed state if device's sysfs entry does not exist yet
Yu Watanabe [Tue, 17 Sep 2019 12:29:23 +0000 (21:29 +0900)]
network: add missing link->network checks
When the function is called, no network file may be assigned to the
link.
Frantisek Sumsal [Tue, 17 Sep 2019 12:21:05 +0000 (12:21 +0000)]
Merge pull request #13573 from fbuihuu/ask-password-small-fixes
Ask password small fixes
Susant Sahani [Mon, 16 Sep 2019 14:43:34 +0000 (20:13 +0530)]
Add test for IPv6 Route advertisement
Susant Sahani [Sat, 14 Sep 2019 11:14:22 +0000 (16:44 +0530)]
network: Add support to advertie ipv6 route
Implements https://tools.ietf.org/html/rfc4191
cat veth99.network
```
[Match]
Name=veth99
[Network]
DHCP=no
IPv6PrefixDelegation=yes
Address=2001:db8:0:1::1/64
[IPv6Prefix]
Prefix=2001:db8:0:1::4/64
[IPv6RoutePrefix]
Route=2001:db0:fff::/48
```
Wireshark
```
Frame 481: 142 bytes on wire (1136 bits), 142 bytes captured (1136 bits) on interface 0
Ethernet II, Src: 1e:04:f8:b8:2f:d4 (1e:04:f8:b8:2f:d4), Dst: IPv6mcast_01 (33:33:00:00:00:01)
Internet Protocol Version 6, Src: fe80::1c04:f8ff:feb8:2fd4, Dst: ff02::1
Internet Control Message Protocol v6
Type: Router Advertisement (134)
Code: 0
Checksum: 0xec77 [correct]
[Checksum Status: Good]
Cur hop limit: 0
Flags: 0x00, Prf (Default Router Preference): Medium
Router lifetime (s): 0
Reachable time (ms): 0
Retrans timer (ms): 0
ICMPv6 Option (Source link-layer address : 1e:04:f8:b8:2f:d4)
Type: Source link-layer address (1)
Length: 1 (8 bytes)
Link-layer address: 1e:04:f8:b8:2f:d4 (1e:04:f8:b8:2f:d4)
ICMPv6 Option (MTU : 1500)
Type: MTU (5)
Length: 1 (8 bytes)
Reserved
MTU: 1500
ICMPv6 Option (Prefix information : 2001:db8:0:1::4/64)
Type: Prefix information (3)
Length: 4 (32 bytes)
Prefix Length: 64
Flag: 0xc0, On-link flag(L), Autonomous address-configuration flag(A)
Valid Lifetime: 2592000
Preferred Lifetime: 604800
Reserved
Prefix: 2001:db8:0:1::4
ICMPv6 Option (Route Information : Medium 2001:db0:fff::/48)
Type: Route Information (24)
Length: 3 (24 bytes)
Prefix Length: 48
Flag: 0x00, Route Preference: Medium
...0 0... = Route Preference: Medium (0)
000. .000 = Reserved: 0
Route Lifetime: 604800
Prefix: 2001:db0:fff::
```
Zbigniew Jędrzejewski-Szmek [Tue, 17 Sep 2019 08:54:18 +0000 (10:54 +0200)]
Merge pull request #13300 from mrc0mmand/test-execreload
test: introduce TEST-37-EXECRELOAD
Michal Sekletar [Mon, 9 Sep 2019 12:38:35 +0000 (14:38 +0200)]
path: stop watching path specs once we triggered the target unit
We start watching them again once we get a notification that triggered
unit entered inactive or failed state.
Fixes: #10503
Zbigniew Jędrzejewski-Szmek [Tue, 17 Sep 2019 07:57:21 +0000 (09:57 +0200)]
Merge pull request #13565 from yuwata/network-drop-ipv6ll-address
network: drop IPv6LL address when LinkLocalAddressing=no|ipv4
Franck Bui [Tue, 17 Sep 2019 07:48:12 +0000 (09:48 +0200)]
tty-ask-pwd-agent: simplify handling of --wall a bit
"wall" was always NULL when passed to parse_password() so let's simplify this
part a bit.
The effective changes are small but wall_tty_match() needed to be moved so it's
still visible from parse_password().
No functional changes.