summaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* systemd-sleep: improve /proc/swaps open fail messageZach Smith2019-10-241-1/+1
|
* systemd-sleep: always prefer resume device or fileZach Smith2019-10-243-119/+236
| | | | | | | This change checks each swap partition or file reported in /proc/swaps to see if it matches the values configured with resume= and resume_offset= kernel parameters. If a match is found, the matching swap entry is used as the hibernation location regardless of swap priority.
* Merge pull request #13649 from keszybz/arphrd-minimizationYu Watanabe2019-09-255-38/+21
|\ | | | | Arphrd minimization
| * basic/arphrd: stop discriminating against NETROM and CISCOZbigniew Jędrzejewski-Szmek2019-09-252-2/+1
| | | | | | | | | | | | 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.
| * basic: massively reduce the size of arphdr lookup functionsZbigniew Jędrzejewski-Szmek2019-09-254-34/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * test-arphdr-list: modernize and provide some useful outputZbigniew Jędrzejewski-Szmek2019-09-251-4/+5
| |
| * test-mountpoint-util: improve output a bitZbigniew Jędrzejewski-Szmek2019-09-241-3/+4
| |
* | Updated log message when the timesync happens for the first time (#13624)cbzxt2019-09-251-3/+3
| |
* | log: Add missing "%" in "%m" log format stringsFilipe Brandenburger2019-09-252-2/+2
| | | | | | | | | | These were clearly intended to be "%m" to display the human readable version of the error stored in errno.
* | Merge pull request #13481 from Antique/cgroupv2Chris Down2019-09-2412-5/+237
|\ \ | | | | | | cgroup: introduce support for cgroup v2 CPUSET controller
| * | cgroup-util: fix obsolete comment about supported controllersPavel Hrdina2019-09-241-2/+1
| | | | | | | | | | | | | | | The list might grow so make the comment more generic to not worry about it if some controller is implemented.
| * | cgroup: introduce support for cgroup v2 CPUSET controllerPavel Hrdina2019-09-2412-3/+236
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* / link: Add support to configure NIC ring buffer sizeSusant Sahani2019-09-245-0/+110
|/
* Merge pull request #13600 from keszybz/ratelimitLennart Poettering2019-09-2329-149/+155
|\ | | | | Clean up ratelimit functions and disable /dev/kmsg ratelimit
| * basic/log: put a ratelimit on our logging to /dev/kmsgZbigniew Jędrzejewski-Szmek2019-09-201-0/+13
| | | | | | | | See the inline comment for details.
| * pid1: disable printk ratelimit in early bootZbigniew Jędrzejewski-Szmek2019-09-203-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * tree-wide: say "ratelimit" not "rate_limit"Zbigniew Jędrzejewski-Szmek2019-09-2017-92/+92
| | | | | | | | | | | | "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.
| * pid1: rename start_limit to start_ratelimitZbigniew Jędrzejewski-Szmek2019-09-205-17/+17
| | | | | | | | | | 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.
| * Drop RATELIMIT macrosZbigniew Jędrzejewski-Szmek2019-09-2011-45/+20
| | | | | | | | | | Using plain structure initialization is both shorter _and_ more clearer. We get type safety for free.
| * pid1: do not warn if /run/systemd/relabel-extra.d/ doesn't existZbigniew Jędrzejewski-Szmek2019-09-191-1/+2
| | | | | | | | After all, that is the expected state.
* | Merge pull request #11883 from yuwata/network-dhcp-renewYu Watanabe2019-09-229-5/+109
|\ \ | | | | | | network: dhcp renew
| * | networkctl: add renew commandYu Watanabe2019-09-211-1/+45
| | |
| * | network: introduce new bus method Renew() and RenewLink()Yu Watanabe2019-09-216-0/+49
| | |
| * | dhcp: introduce sd_dhcp_client_send_renew()Yu Watanabe2019-07-182-0/+12
| | |
| * | dhcp: fix minor coding style issueYu Watanabe2019-07-181-4/+3
| | |
* | | Merge pull request #13610 from yuwata/network-check-one-more-sectionYu Watanabe2019-09-221-0/+4
|\ \ \ | | | | | | | | network: assorted follow-ups
| * | | network: add one more section validty checkYu Watanabe2019-09-211-0/+4
| | | | | | | | | | | | | | | | Follow-up for 203d4df5732b1fdcf50db498ddeb74a934b21f87.
* | | | tree-wide: various code-formatting improvementsFrantisek Sumsal2019-09-227-14/+9
|/ / / | | | | | | | | | Reported/found by Coccinelle
* | | Merge pull request #13605 from cdown/onoChris Down2019-09-202-2/+1
|\ \ \ | | | | | | | | Fixes for recent SIP work
| * | | networkd: Fix SIP double-freeChris Down2019-09-201-1/+0
| | | | | | | | | | | | | | | | This is already strv_freed right above
| * | | dhcp: Log SIP server information correctlyChris Down2019-09-201-1/+1
| | | |
* | | | sd-radv: if lifetime < SD_RADV_DEFAULT_MAX_TIMEOUT_USEC, adjust timeout (#13491)Georg Müller2019-09-201-0/+11
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | network: DHCP server Add support to transmit SIP serverSusant Sahani2019-09-2020-11/+346
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | network dhcp4: Add support send request options in a generic mannerSusant Sahani2019-09-205-0/+85
| | |
* | | polkit: fix typoAsciiWolf2019-09-202-2/+2
| | |
* | | dhcp6: use unaligned_read_be32()Yu Watanabe2019-09-201-1/+1
| |/ |/| | | | | Closes #13591.
* | Merge pull request #13582 from yuwata/udevadm-reloadYu Watanabe2019-09-181-5/+5
|\ \ | | | | | | udevadm: use 'udevadm control' to reload udevd
| * | udevadm: use usec_add()Yu Watanabe2019-09-171-5/+4
| | | | | | | | | | | | Also fixes description of event source.
| * | udevadm: missing initialization of descriptorYu Watanabe2019-09-171-0/+1
| | |
* | | Merge pull request #13583 from keszybz/networkd-hash-compare-equalityYu Watanabe2019-09-184-57/+60
|\ \ \ | | | | | | | | Networkd hash compare equality
| * | | networkd: unbreak routing_policy_rule_compare_func()Zbigniew Jędrzejewski-Szmek2019-09-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | !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.
| * | | networkd: make neighbor_hash_func() handle the same data as ↵Zbigniew Jędrzejewski-Szmek2019-09-171-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | networkd: use same order in _hash_func() and _compare_func()Zbigniew Jędrzejewski-Szmek2019-09-172-27/+37
| | | | | | | | | | | | | | | | | | | | This makes it easier to see that the same data is handled in both cases. No functional change.
| * | | networkd: split out helper function for address extractionZbigniew Jędrzejewski-Szmek2019-09-171-30/+21
| | | |
* | | | dhcp6: add missing option length checkYu Watanabe2019-09-171-2/+5
| | | | | | | | | | | | | | | | Closes #13578.
* | | | Merge pull request #13577 from yuwata/network-fix-ci-failureFrantisek Sumsal2019-09-171-6/+6
|\ \ \ \ | | | | | | | | | | network: fix CI failure
| * | | | network: do not enter failed state if device's sysfs entry does not exist yetYu Watanabe2019-09-171-2/+2
| | | | |
| * | | | network: add missing link->network checksYu Watanabe2019-09-171-4/+4
| | |/ / | |/| | | | | | | | | | | | | | When the function is called, no network file may be assigned to the link.
* | | | Merge pull request #13508 from yuwata/network-route-fix-13506Zbigniew Jędrzejewski-Szmek2019-09-177-249/+163
|\ \ \ \ | | |/ / | |/| | network: takes more route information into hash func
| * | | network: also take Route::initcwnd and ::initrwnd into hash funcYu Watanabe2019-09-172-0/+35
| | | | | | | | | | | | | | | | Fixes #13506.