Commit Graph

41756 Commits

Author SHA1 Message Date
Yu Watanabe 0eb5e6d3f0 dhcp6: use unaligned_read_be32()
Closes #13591.
2019-09-20 08:04:15 +00:00
Zbigniew Jędrzejewski-Szmek 90b059b608 pid1: do not warn if /run/systemd/relabel-extra.d/ doesn't exist
After all, that is the expected state.
2019-09-19 18:01:40 +02:00
Yu Watanabe 5a4717fe8e
Merge pull request #13582 from yuwata/udevadm-reload
udevadm: use 'udevadm control' to reload udevd
2019-09-18 08:15:01 +09:00
Yu Watanabe 62080133da
Merge pull request #13583 from keszybz/networkd-hash-compare-equality
Networkd hash compare equality
2019-09-18 08:09:48 +09:00
Yu Watanabe 6ffe71d0e2 dhcp6: add missing option length check
Closes #13578.
2019-09-17 18:29:20 +00:00
Frantisek Sumsal 59a224d728
Merge pull request #13577 from yuwata/network-fix-ci-failure
network: fix CI failure
2019-09-17 17:42:26 +00:00
Zbigniew Jędrzejewski-Szmek 314ed4f994 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.
2019-09-17 19:27:58 +02:00
Zbigniew Jędrzejewski-Szmek 404ca5560b
Merge pull request #13508 from yuwata/network-route-fix-13506
network: takes more route information into hash func
2019-09-17 19:20:21 +02:00
Zbigniew Jędrzejewski-Szmek a811fb8b37 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.
2019-09-17 19:13:09 +02:00
Zbigniew Jędrzejewski-Szmek 67e05dd8cd 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.
2019-09-17 19:11:50 +02:00
Zbigniew Jędrzejewski-Szmek 24be91817f networkd: split out helper function for address extraction 2019-09-17 19:09:57 +02:00
Yu Watanabe ce8a4ef13d unit: add ExecReload= in systemd-udevd.service 2019-09-18 01:32:46 +09:00
Yu Watanabe f6e8ba8165 udevadm: use usec_add()
Also fixes description of event source.
2019-09-18 01:29:49 +09:00
Yu Watanabe 2f5b282aab udevadm: missing initialization of descriptor 2019-09-18 01:29:40 +09:00
Anita Zhang 898fc00e79 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).
2019-09-17 15:48:44 +00:00
Frantisek Sumsal 8813a8c332 test: rename TEST-EXECRELOAD to avoid name conflict 2019-09-18 00:14:43 +09:00
Yu Watanabe edfbf051e1
Merge pull request #13559 from ssahani/ipv6ra-route
network: make networkd able to advertise IPv6 routes on links
2019-09-18 00:13:08 +09:00
ypf791 b49e14d5f3 core: coldplug possible nop_job 2019-09-17 13:46:21 +00:00
Yu Watanabe fa3e401a79 network: also take Route::initcwnd and ::initrwnd into hash func
Fixes #13506.
2019-09-17 21:53:42 +09:00
Yu Watanabe c077a205e7 network: take more route information into hash func 2019-09-17 21:53:42 +09:00
Yu Watanabe f136875549 network: make route_get() or friends take Route object 2019-09-17 21:53:42 +09:00
Yu Watanabe 48fb0d1301 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.
2019-09-17 21:53:42 +09:00
Yu Watanabe 67ad633b58
Merge pull request #13567 from keszybz/logind-two-refactoring-patches
Logind two refactoring patches
2019-09-17 21:41:38 +09:00
Yu Watanabe 4d59e14f32 network: do not enter failed state if device's sysfs entry does not exist yet 2019-09-17 21:34:06 +09:00
Yu Watanabe b1b0b42e48 network: add missing link->network checks
When the function is called, no network file may be assigned to the
link.
2019-09-17 21:29:35 +09:00
Frantisek Sumsal 5fc78bae06
Merge pull request #13573 from fbuihuu/ask-password-small-fixes
Ask password small fixes
2019-09-17 12:21:05 +00:00
Susant Sahani 9633f977ea Add test for IPv6 Route advertisement 2019-09-17 12:10:19 +02:00
Susant Sahani 203d4df573 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::
```
2019-09-17 12:09:59 +02:00
Zbigniew Jędrzejewski-Szmek 69cebea78a
Merge pull request #13300 from mrc0mmand/test-execreload
test: introduce TEST-37-EXECRELOAD
2019-09-17 10:54:18 +02:00
Michal Sekletar 8fca6944c2 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
2019-09-17 10:11:32 +02:00
Zbigniew Jędrzejewski-Szmek e8c36cc596
Merge pull request #13565 from yuwata/network-drop-ipv6ll-address
network: drop IPv6LL address when LinkLocalAddressing=no|ipv4
2019-09-17 09:57:21 +02:00
Franck Bui 85c221eb98 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.
2019-09-17 09:54:02 +02:00
Zbigniew Jędrzejewski-Szmek 8dd2fb558f
Merge pull request #13494 from yuwata/dhcp6-delay
dhcp6: rfc8415 fixes
2019-09-17 09:14:12 +02:00
Maciej Stanczew 6327aa9f6c core: Fix setting StatusUnitFormat from config files 2019-09-17 15:21:21 +09:00
Yu Watanabe 7b3770a75f test-network: add one more test case for LinkLocalAddressing= 2019-09-17 09:45:22 +09:00
Yu Watanabe 5539fc0f73 network: drop IPv6LL address when LinkLocalAddressing=no|ipv4
C.f. disscussion in #13533.

Hopefully fixes #12886.
2019-09-17 09:45:22 +09:00
Susant Sahani 61cda4d796 network DHCP4: Dont mislead the logs.
The debug log making sense to the end user as an error.
2019-09-17 08:09:44 +09:00
Franck Bui 65943cc350 tty-ask-pwd-agent: fix message forwarded to wall(1)
Commit a1c111c2d1 wrongly replaced '!' with ':' when the message is
forwarded to wall(1).

Indeed in this case we are not requesting the user for providing a password but
instead we are simply displaying a message to suggest starting
tty-ask-password-agent for providing the password.
2019-09-16 22:08:26 +02:00
Donald A. Cupp Jr d34a58222d Update m4 for selective utmp support.
modified:   tmpfiles.d/systemd.conf.m4
2019-09-16 21:11:44 +02:00
matthiasroos 358e50fa7f hwdb: add Medion Akoya E2292 (#13498)
Fixes #13480.
2019-09-16 21:10:15 +02:00
Rafael Fontenelle bf55a2df4d po: update Brazilian Portuguese translation 2019-09-16 21:09:03 +02:00
Zbigniew Jędrzejewski-Szmek 4e5aa79185 bootctl: add "system-options" verb 2019-09-16 18:08:54 +02:00
Zbigniew Jędrzejewski-Szmek 28f0aef4c7 man: document SystemdOptions variable 2019-09-16 18:08:54 +02:00
Zbigniew Jędrzejewski-Szmek 53aa0d02ad Add support for SystemdOptions EFI var to augment /proc/cmdline
In various circumstances, overriding the kernel commandline can be inconvenient.
People have different bootloaders, and e.g. the grub config can be pretty scary.
grubby helps, but it isn't always available.

This option adds an alternative mechanism that can quite convenient on EFI
systems. cmdline settings have higher priority, because they can be (usually)
changed on the bootloader prompt.

$SYSTEMD_EFI_OPTIONS can be used to override, same as $SYSTEMD_PROC_CMDLINE.
2019-09-16 18:08:54 +02:00
Zbigniew Jędrzejewski-Szmek e825ea2f4c test-proc-cmdline: use test_setup_logging() 2019-09-16 18:08:54 +02:00
Zbigniew Jędrzejewski-Szmek 0bb2f0f10e util-lib: split shared/efivars into basic/efivars and shared/efi-loader
I want to use efivars.[ch] in proc-cmdline.c, but most of the efivars stuff is
not needed in basic/. Move the file from shared/ to basic/, but then move back
most of the higher-level functions to the new shared/efi-loader.c file.
2019-09-16 18:08:53 +02:00
Zbigniew Jędrzejewski-Szmek 2bfa8466c0 util-lib: move shall_restore_state() to shared/reboot-util
It's just a small function, but it is higher-level functionality.
I don't see a good place for it, reboot-util.[ch] seems least bad
2019-09-16 18:08:01 +02:00
Zbigniew Jędrzejewski-Szmek da33cba0f8 util-lib: move runlevel_to_target() to shared/unit-file
It if of course related to /proc/cmdline parsing, but is higher-level
functionality built on top of it. It should be in shared/ because it
is something to be used by pid1 and related utilities, not something for
level-level libraries.
2019-09-16 18:08:00 +02:00
Zbigniew Jędrzejewski-Szmek fdb3decaa7 util-lib: move some functions from basic/cgroup-util to shared/cgroup-setup
This way less stuff needs to be in basic. Initially, I wanted to move all the
parts of cgroup-utils.[ch] that depend on efivars.[ch] to shared, because
efivars.[ch] is in shared/. Later on, I decide to split efivars.[ch], so the
move done in this patch is not necessary anymore. Nevertheless, it is still
valid on its own. If at some point we want to expose libbasic, it is better to
to not have stuff that belong in libshared there.
2019-09-16 18:08:00 +02:00
Zbigniew Jędrzejewski-Szmek 55fced5a19 util-lib: move yes_no() and friends to string-util.h 2019-09-16 18:06:20 +02:00