Commit Graph

41667 Commits

Author SHA1 Message Date
Steve Traylen 7a72a95741 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.
2019-09-24 09:48:03 +02:00
Lennart Poettering 68c2b5ddb1
Merge pull request #13600 from keszybz/ratelimit
Clean up ratelimit functions and disable /dev/kmsg ratelimit
2019-09-23 12:59:09 +02:00
Yu Watanabe 82d1264048
Merge pull request #11883 from yuwata/network-dhcp-renew
network: dhcp renew
2019-09-22 07:44:23 +02:00
Yu Watanabe fc9d85b9bc
Merge pull request #13610 from yuwata/network-check-one-more-section
network: assorted follow-ups
2019-09-22 07:18:28 +02:00
Michael Biebl decef551af man: fix typo 2019-09-22 07:17:46 +02:00
Frantisek Sumsal 38288f0bb8 tree-wide: various code-formatting improvements
Reported/found by Coccinelle
2019-09-22 07:17:27 +02:00
Yu Watanabe 308e7dfdce networkctl: add renew command 2019-09-21 20:27:43 +09:00
Yu Watanabe ae65d7dbe3 network: introduce new bus method Renew() and RenewLink() 2019-09-21 20:27:36 +09:00
Yu Watanabe 714a199e48 network: add one more section validty check
Follow-up for 203d4df573.
2019-09-21 20:17:15 +09:00
Yu Watanabe 9b6dddd170 po: update Japanese translations
Follow-up for ea2552639b.
2019-09-21 20:16:22 +09:00
AsciiWolf 1697a28567 l10n: update Czech Translation 2019-09-21 08:26:09 +00:00
Chris Down 2c7e06de6d
Merge pull request #13605 from cdown/ono
Fixes for recent SIP work
2019-09-20 18:10:34 +02:00
Zbigniew Jędrzejewski-Szmek 78158d134b basic/log: put a ratelimit on our logging to /dev/kmsg
See the inline comment for details.
2019-09-20 16:05:53 +02:00
Zbigniew Jędrzejewski-Szmek 6123dfaa72 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.
2019-09-20 16:05:53 +02:00
Zbigniew Jędrzejewski-Szmek 5ac1530eca 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.
2019-09-20 16:05:53 +02:00
Zbigniew Jędrzejewski-Szmek 7bf081a1e5 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.
2019-09-20 16:05:53 +02:00
Zbigniew Jędrzejewski-Szmek 8c227e7f2b Drop RATELIMIT macros
Using plain structure initialization is both shorter _and_ more clearer.
We get type safety for free.
2019-09-20 16:05:53 +02:00
Georg Müller ef90b6a4fb 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.
2019-09-20 13:52:29 +00:00
Chris Down de307e199b networkd: Fix SIP double-free
This is already strv_freed right above
2019-09-20 15:15:04 +02:00
Chris Down 850fd9b8f8 dhcp: Log SIP server information correctly 2019-09-20 15:13:00 +02:00
Susant Sahani 299d578f7f 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
2019-09-20 21:22:23 +09:00
Susant Sahani 5bc945bec4 network dhcp4: Add support send request options in a generic manner 2019-09-20 21:05:48 +09:00
AsciiWolf 984b96aa7a polkit: fix typo 2019-09-20 21:02:47 +09:00
Susant Sahani 98f0e10429 test-network: Drop start dnsmasq 2019-09-20 08:09:25 +00:00
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