1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00
Commit Graph

56525 Commits

Author SHA1 Message Date
Yu Watanabe
3c39b9cf37 test-network: remove unused configs 2022-02-24 08:37:30 +09:00
Yu Watanabe
047b9991a4 network: create stacked netdevs after the underlying link is activated
Otherwise, the activation policy for the netdevs are ignored.

Fixes #22593.
2022-02-24 08:37:26 +09:00
Yu Watanabe
6dcc087cb6 test-network: add testcases for address property change
This adds a testcase for issue #22515.
2022-02-24 07:37:50 +09:00
Yu Watanabe
390247d2f9 network: also hash address label and broadcast address
Otherwise, even if the address label and/or broadcast address are changed
in a .network file, the change will not be applied on reconfigure.
2022-02-24 07:28:04 +09:00
Yu Watanabe
9472be2614 network: use address_set_broadcast() at one more place 2022-02-24 07:13:31 +09:00
Yu Watanabe
e680486d6f network: set broadcast address on request
Previously, the broadcast address was set to a Address object in
address_section_verify() (or address_acquire()). But, for wireguard
interfaces, we do not use the broadcast address. The .network file may
be assigned to multiple interfaces, hence, we cannot determine if we
should set the broadcast address in address_section_verify().

This makes the broadcast address set in link_request_address().
Then, we set the broadcast address only when we need it.
2022-02-24 07:07:04 +09:00
Yu Watanabe
5d0030310c network: compare addresses more strictly
This re-introduce the full hash and compre functions for Address,
which was reverted 1d30fc5cb6 (#17851).

The issue #17831, which is fixed by #17851, is handled in a different way;
simply ignore to configure the conflicted DHCPv6 address. Previously, we
warn about the conflict, but continue to configure the address anyway, and
the kernel ignores the request. So, it is not necessary to request the
conflicted address in networkd side.

This fixes the following issues:
- when a link has an address, and corresponding .network file has the
  address with different prefix length, then the prefix length specified
  in the .network file will not be applied,
- we cannot specify multiple IPv4 addresses with different prefix
  length, e.g.
  ----
  Address=10.10.10.10/24
  Address=10.10.10.10/16
  ----
  This is spurious setup, but the kernel allows it.

Fixes #22515.
2022-02-24 06:30:37 +09:00
Daan De Meyer
0802f62efc systemctl: Show how long a service ran for after it exited in status output 2022-02-23 20:09:50 +00:00
Frantisek Sumsal
80ff956704
Merge pull request #22591 from evverx/no-deps
ci: build systemd without optional dependencies
2022-02-23 09:27:41 +00:00
Zbigniew Jędrzejewski-Szmek
0b6c0b8083
Merge pull request #22605 from yuwata/test-journal-send-fd-leaks
test-journal-send: fix fd leaks
2022-02-23 09:15:41 +01:00
Zbigniew Jędrzejewski-Szmek
1810976ba9
Merge pull request #22608 from keszybz/doc-cleanups
Man page cleanups
2022-02-23 09:11:07 +01:00
Zbigniew Jędrzejewski-Szmek
5bb309722d
Merge pull request #22414 from yuwata/resolve-synthesize-empty-domain-follow-up
resolve: follow-up for synthesizing empty name
2022-02-23 09:10:49 +01:00
Peter Hutterer
8ac9ec4d5c udev-builtin-input_id: don't label absolute mice as pointing sticks
The Getac UX10 tablet exposes a "CUST0000:00 0EEF:C002 Mouse" device
with BTN_LEFT/RIGHT and ABS_X/Y on the i2c bus. This causes the builtin
to incorrectly label it as pointing stick (all i2c mice are
tagged as ID_INPUT_POINTING_STICK, see 3d7ac1c655).

Fix this by adding a separate variable for absolute pointing
devices like the VMmouse USB mouse or this Getac tablet - this way we
skip the pointing stick check.

See https://gitlab.freedesktop.org/libinput/libinput/-/issues/743
for recordings.
2022-02-23 09:03:21 +01:00
Zbigniew Jędrzejewski-Szmek
f2acaf39c1
Merge pull request #22600 from poettering/timestamp_is_set-more
make more use of timestamp_is_set()
2022-02-23 08:59:49 +01:00
Zbigniew Jędrzejewski-Szmek
fe003f02dd man: various issues reported in #22432
Fixes #22432.
2022-02-23 08:56:03 +01:00
Zbigniew Jędrzejewski-Szmek
d68c797c6d man/systemd-network: reword descriptions of DHCPPrefixDelegation= and dst-host 2022-02-23 08:56:03 +01:00
Zbigniew Jędrzejewski-Szmek
e6ce195163 man/systemd-analyze: split out example to a separate section
It turns out we can't have an Example nested in a list, and every
combination of nesting I tried looked bad either in troff or in html.
The whole example is moved to a separate section.
2022-02-23 08:56:03 +01:00
Zbigniew Jędrzejewski-Szmek
8c4db5629c man: adjust command for Fedora installations
glibc now has Suggests:glibc-minimal-langpack, so we don't
need to mention it ourselves.

--repo=… is a nicer alternative to --disablerepo=* --enablerepo=….
It also avoids the issue with quoting.

Let's exclude weak deps, but install systemd-networkd, so the container
can configure networking if necessary.
2022-02-23 08:56:03 +01:00
Yu Watanabe
30fa3aa1fa resolve: synthesize empty domain only when A and/or AAAA key is requested
Follow-up for 3b2ac14ac4 (#22231).

Before this commit.
---
$ dig -t SRV '.'

; <<>> DiG 9.16.24-RH <<>> -t SRV .
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 16836
;; flags: qr aa rd ra ad; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;.				IN	SRV

;; Query time: 1 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Fri Feb 04 12:01:09 JST 2022
;; MSG SIZE  rcvd: 28
---

After this commit.
---
$ dig -t SRV '.'

; <<>> DiG 9.16.24-RH <<>> -t SRV .
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19861
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65494
;; QUESTION SECTION:
;.				IN	SRV

;; AUTHORITY SECTION:
.			86394	IN	SOA	a.root-servers.net. nstld.verisign-grs.com. 2022020302 1800 900 604800 86400

;; Query time: 20 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Fri Feb 04 12:00:12 JST 2022
;; MSG SIZE  rcvd: 103
---

Fixes #22401.
2022-02-23 07:53:57 +09:00
Yu Watanabe
176a9a2cca resolve: make dns_scope_good_domain() take DnsQuery* 2022-02-23 07:53:57 +09:00
Yu Watanabe
830f50ab1e resolve: drop never matched condition
As dns_scope_good_domain() does not return negative errno.
2022-02-23 07:53:53 +09:00
Yu Watanabe
eb9752d2be journal-send: close fd on exit when running with valgrind
Fixes an issue reported in #22576.
2022-02-23 07:38:43 +09:00
Yu Watanabe
9048a6ccf3 test-journal-send: close fd opend by syslog()
Fixes an issue reported in #22576.
2022-02-23 07:38:39 +09:00
Luca Boccassi
a549442fff
Merge pull request #22582 from medhefgo/boot-input
boot: Minor input fixes
2022-02-22 22:11:44 +00:00
Luca Boccassi
6ccc08954e
Merge pull request #19970 from curtistklein/watchdog-pretimeout-merge
watchdog: Add watchdog pretimeout support
2022-02-22 22:08:09 +00:00
Yu Watanabe
6e4d122ad1 unit: escape %
Fixes #22601.
2022-02-23 06:54:54 +09:00
Lennart Poettering
b547838000 units: drop After=systemd-networkd.service from systemd-resolved.service
This ordering existed since resolved was first created, but there should
not be any need to order the two services against each other, as
resolved should be able to pick up networkd DNS metadata either way (as
it works with inotify in /run).

Let's drop this hence, and not cargo-cult this to eternity

Also see: https://github.com/systemd/systemd/pull/22389#issuecomment-1045978403
2022-02-23 06:52:39 +09:00
Yu Watanabe
05d8ad0f85
Merge pull request #22596 from yuwata/test-fix-fd-leaks
test: fix fd leaks
2022-02-23 06:51:06 +09:00
Lennart Poettering
0da36375eb tree-wide: use timestamp_is_set() more 2022-02-22 22:49:40 +01:00
Lennart Poettering
ec93eb48f2 coccinelle: automatically look for timestamp_is_set candidates
Based on @mrc0mmand's Coccinelle skills, not mine. All credit is his.

Co-authored-by: Frantisek Sumsal <frantisek@sumsal.cz>
2022-02-22 22:47:12 +01:00
Evgeny Vereshchagin
fb53316fde meson: pass skip-deps on to the fuzzers as well
they should be tested without optional dependecines as well. CIFuzz
kind of covers that but let's just make sure local builds are fine as
well.
2022-02-22 17:50:14 +00:00
Zbigniew Jędrzejewski-Szmek
cab4ed0f4a
Merge pull request #22592 from yuwata/test-oomd-util-fixlets
test: test-oomd-util fixlets
2022-02-22 18:25:45 +01:00
Luca Boccassi
aff3a9e1fa watchdog: add setting to configure pretimeout governor 2022-02-22 17:19:54 +00:00
Curtis Klein
56b96db700 watchdog: check pretimeout governor
Check and log the default pretimeout governor configured in the kernel.
The pretimeout will not work unless at least one governor is available
and configured. This requires loading a kernel module manually.
2022-02-22 17:19:54 +00:00
Curtis Klein
5717062e93 watchdog: Add watchdog pretimeout support
Add support for managing and configuring watchdog pretimeout values if
the watchdog hardware supports it. The ping interval is adjusted to
account for a pretimeout so that it will still ping at half the timeout
interval before a pretimeout event would be triggered. By default the
pretimeout defaults to 0s or disabled.

The RuntimeWatchdogPreSec config option is added to allow the pretimeout
to be specified (similar to RuntimeWatchdogSec). The
RuntimeWatchdogPreUSec dbus property is added to override the pretimeout
value at runtime (similar to RuntimeWatchdogUSec). Setting the
pretimeout to 0s will disable the pretimeout.
2022-02-22 17:19:54 +00:00
Frantisek Sumsal
b491d74064 ci: fix clang-13 installation
For some reason Ubuntu Focal repositories now have `llvm-13` virtual
package which can't be installed, but successfully fools our check,
resulting in no clang/llvm being installed...

```
$ apt show llvm-13
Package: llvm-13
State: not a real package (virtual)
N: Can't select candidate version from package llvm-13 as it has no candidate
N: Can't select versions from package 'llvm-13' as it is purely virtual
N: No packages found

$ apt install --dry-run llvm-13
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package llvm-13 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'llvm-13' has no installation candidate
```
2022-02-22 17:57:25 +01:00
Zbigniew Jędrzejewski-Szmek
09d0758b22
Merge pull request #22574 from yuwata/network-dhcp-pd-fixes
network: dhcp-pd: fix two issues
2022-02-22 17:53:00 +01:00
Lennart Poettering
92148fb777 clang-format: we actually typically use 16ch continuation indentation
We use 8 for blocks, and 16 for continuation in most cases afaics, hence
say so in .clang-format too
2022-02-22 17:32:50 +01:00
Yu Watanabe
be99883e13 test: fix file descriptor leak in test-psi-util
Fixes an issue reported in #22576.
2022-02-23 00:58:16 +09:00
Yu Watanabe
1da5325d19 test: fix file descriptor leak in test-tmpfiles.c
Also fixes a typo in assertion.

Fixes an issure reported in #22576.
2022-02-23 00:58:16 +09:00
Yu Watanabe
19962747ca test: fix file descriptor leak in test-fs-util
Fixes an issue reported in #22576.
2022-02-23 00:58:13 +09:00
Evgeny Vereshchagin
ca57d11652 ci: build systemd without optional dependencies
to catch issues like https://github.com/systemd/systemd/pull/22585#issuecomment-1047640155
2022-02-22 15:46:15 +00:00
Jan Janssen
3f9973bf36 boot: Handle shift and logo keys too
Some firmware supports sending input events for shift and logo keys.
Previously, we would suppress these with EFI_NOT_READY unless
some other key was pressed alongside, but it is really the job of the
caller to decide how to handle these.

Note that for keys that already have a printable shift representation
the reported input event will not have the shift key bits set
(Shift+a is reported as A). Should some firmware turn out to violate the
spec here we can always remove that part.
2022-02-22 16:34:55 +01:00
Jan Janssen
1cb5d7857b boot: Properly check status code of console_key_read
In some cases there was a unlikely possibility that we would look
at an uninitialized key value.
Also, returning in case of unexpected input error cases should prevent
infinite looping.
2022-02-22 16:34:52 +01:00
Lennart Poettering
bd4f672e4c
Merge pull request #22584 from poettering/systemctl-verb-renamed
systemctl: rename "verb" entrypoint functions systematically to verb_xyz()
2022-02-22 16:16:58 +01:00
Lennart Poettering
c04c7c10c0 analyze: fix build on non-seccomp builds
Follow-up for #22585

See: https://github.com/systemd/systemd/pull/22585#issuecomment-1047658990
2022-02-22 16:15:52 +01:00
Lennart Poettering
623461c130 systemctl: rework daemon_reload() functions
Let's split out the inner parts of verb_daemon_reload() as a function
daemon_reload() and then stop using the former outside of the verbs
logic, and instead call the latter whenever we need to reload the daemon
as auxiliary opeation.

This should make our logic more systematic as we don't have to provide
fake or misleading argc/argv to verb_daemon_reload() anymore.
2022-02-22 14:15:08 +01:00
Lennart Poettering
32baf64d5a systemctl: systematically rename verb entrypoints verb_xyz()
Let's clean up our function naming a bit, and always name the
verb_xyz(), where the xyz maps to the command line verb as closely as
possible.

No actual code changes, just an attempt to make the systemctl sources a
bit more systematic, and less surprising.
2022-02-22 14:15:07 +01:00
Yu Watanabe
282696ce52 test: fix file descriptor leak in test-oomd-util
Fixes an issue reported in #22576.
2022-02-22 21:50:52 +09:00
Yu Watanabe
8306912b0e test: fix memory and fd leak in test-dhcp6-client
Fixes an issue reported in #22576.
2022-02-22 21:50:43 +09:00