Yu Watanabe
a1fa99d841
udev: rename is_device_busy() -> event_is_blocked()
...
Also this rename delaying_seqnum -> blocker_seqnum.
2021-08-10 15:19:41 +09:00
Yu Watanabe
5f4bca9dcc
udev: do not try to process events if there is no free worker
2021-08-10 15:19:41 +09:00
Yu Watanabe
f2a5412bf2
udev: propagate error on spawning a worker
2021-08-10 15:19:41 +09:00
Yu Watanabe
92fd70addf
udev: add usec_add() at one more place
2021-08-10 15:19:41 +09:00
Yu Watanabe
0744e74c52
udev: make event_queue_start() return negative errno on error
2021-08-10 15:19:27 +09:00
Yu Watanabe
5393c52897
udev: make event_free() return NULL
2021-08-10 15:16:56 +09:00
Yu Watanabe
6be97d67c8
udev: update log message to clarify that the error is ignored
2021-08-10 15:16:56 +09:00
Yu Watanabe
419ec63135
udev: move several functions
...
No functional chage.
2021-08-10 15:16:56 +09:00
Yu Watanabe
e0d61dac33
udev: also rename struct udev_ctrl -> UdevCtrl
2021-08-10 15:16:56 +09:00
Yu Watanabe
d9239923c1
udev: rename type name e.g. struct worker -> Worker
2021-08-10 15:16:56 +09:00
Yu Watanabe
4c2c2a1256
network: use usec_add() at several more places
2021-08-10 15:12:24 +09:00
Yu Watanabe
ae48d2d142
network: make IPv6Token private, and ipv6token_new() static
2021-08-10 15:12:24 +09:00
Yu Watanabe
f784681a3e
network: ndisc: update a log message
...
Also slightly rename functions.
2021-08-10 15:12:24 +09:00
Yu Watanabe
b378b150b7
network: adjust log messages
...
Follow-up for #19944 .
2021-08-10 15:04:04 +09:00
Yu Watanabe
8716018664
network: DHCP[46] -> DHCPv[46] in log messages
2021-08-10 15:02:35 +09:00
Yu Watanabe
ccffa166d8
network: use request queue to configure DHCP{4,6} clients
...
Previously, when UUID is requested for DUID, then the clients are
configured in callback of bus methods.
But now, 'request queue' was implemented, so we can use it to wait until
the product UUID is obtained.
2021-08-10 14:55:34 +09:00
Yu Watanabe
6211b7362a
network: do not request UUID frequently on failure
...
If many interfaces request UUID, and networkd cannot get it for some
reasons, then previously we call the DBus method so frequently.
2021-08-10 14:48:18 +09:00
Yu Watanabe
bc8bd68db8
network: downgrade log level in dhcp6_configure()
...
And make the callers warn about failures.
2021-08-10 14:48:18 +09:00
Yu Watanabe
5aebe9c898
network: downgrade log level in dhcp4_configure()
...
And make the callers warn about failures.
2021-08-10 14:48:18 +09:00
Yu Watanabe
cb71e9c606
network: drop configurations in the previous .network file when entering unmanaged state
...
When reconfiguring an interface and it will enter unmanaged state,
let's drop configurations from the previously assigned .network file.
2021-08-10 14:44:39 +09:00
Yu Watanabe
5e3bb5da98
network: do not drop foreign configs for loopback and critical interfaces on carrier lost
2021-08-10 14:43:54 +09:00
Yu Watanabe
6bfa06fc39
network: do not drop foreign configs based on the previous .network file
...
`link_drop_foreign_config()` will be called later in link_configure().
2021-08-10 14:43:54 +09:00
Yu Watanabe
f85499108f
network: start/stop LLDP client on carrier gained/lost
...
Then, link_acquire_dynamic_conf() matches link_stop_engines().
Previously, LLDP client is started on interface is up, and stopped
on both down and carrier loss.
2021-08-10 14:43:54 +09:00
Yu Watanabe
d09a179e69
network: reconfigure link after coming back from sleep
...
Previously, link was reconfigured with `link_carrier_reset()`, but it
just re-request to configure static addresses, routes, etc, and restart
engines (e.g. DHCP client).
However, after coming back from sleep, several link information may be
changed, especially the wifi access point may be different. So, we may
need to reconfigure the interface.
2021-08-10 14:43:34 +09:00
Dimitry Ishenko
33e82f3ef3
timesync: add option to periodically save time
2021-08-09 21:06:28 +02:00
Albert Brox
8a513eee30
pid1: add support for cgroup.kill
2021-08-09 12:14:26 +02:00
longpanda
2846007ecf
Fix the "Failed to open random seed ..." message.
...
When boot ArchLinux from Ventoy, it always print `Failed to open random seed file: write protected.`
As Ventoy emulate the ISO file as a read-only CDROM, I didn't test with a real physical CDROM drive, but maybe it also has such problem.
As we use `EFI_FILE_MODE_WRITE` to open the `loader\random-seed` file, so I think it's better to check the result with both `EFI_WRITE_PROTECTED` and `EFI_NOT_FOUND`.
2021-08-09 10:56:01 +02:00
Yu Watanabe
5865dc1493
network: use monotonic instead of boot time to handle address creation/update timestamp
...
Follow-up for 25db3aeaf3 and 899034ba81 .
Fixes another issue in #20244 .
2021-08-09 10:33:49 +02:00
Luca Boccassi
e908236e05
Merge pull request #20384 from keszybz/udev-code-modernization
...
Various minor refactorings (basic/log, udev, cryptsetup-tokens)
2021-08-07 12:06:00 +01:00
Zbigniew Jędrzejewski-Szmek
d340bdd1bd
udev/builtins: make skip_subsystem() and skip_virtio() alike
...
The two functions do not implement identical logic, so they shouldn't
have identical structure, but let's make them both a bit simpler and
more alike.
2021-08-07 09:01:41 +02:00
Zbigniew Jędrzejewski-Szmek
d3d2e3abda
udev/builtins: inline iterator variables and other small modernizations
2021-08-07 09:01:40 +02:00
Zbigniew Jędrzejewski-Szmek
8b06c72969
udev-builtin-input_ic: simplify loop in test_key()
...
We would update 'found' using bit operations, but studiously ignore the actual
value and treat it as boolean. So just use a boolean variable instead. Because
there is a double loop, we would break the inner loop, but repeat the outer
loop, even though the boolean was already set. Add '&& !found' in the loop
conditions to break iteration immediately.
2021-08-07 09:00:55 +02:00
Zbigniew Jędrzejewski-Szmek
169d980bc8
test-log: move logging call where we can still see it
...
We crank the level up in the loop, so we wouldn't see message
from log_info_errno().
Also move the loop iterator declaration inline.
2021-08-07 08:50:27 +02:00
Zbigniew Jędrzejewski-Szmek
700ea50482
cryptsetup-tokens: inline one interator variable declaration
2021-08-07 08:50:18 +02:00
Zbigniew Jędrzejewski-Szmek
2fec408e67
basic/log: invert loop to avoid repeated evaluation of condition
2021-08-07 08:50:16 +02:00
Zbigniew Jędrzejewski-Szmek
4dc2ecd227
basic/log: use structured initialization, drop unused initialization
...
We had 'msghdr' and 'mh' in various places. Now 'const struct msghdr msghdr' is
used consistently. With structured init the variable is only used in the call
to sendmsg(), so let's make it a bit more descriptive.
2021-08-07 08:49:11 +02:00
Max Resch
3c79a56d53
sd-boot: time measurements for the ARM64
...
This adds assembly to read the platform timer from the CP15 coprocessor
register `cntpct_el0` and the frequency from `cntfrq_el0`
2021-08-06 13:40:00 +01:00
Ondrej Kozina
38a0aec61e
cryptsetup: validate optional tpm2 pcr bank field in token.
2021-08-06 13:33:50 +01:00
Michal Koutný
13e721036b
core: Make sure cgroup_oom_queue is flushed on manager exit
...
The unit queues are not serialized/deserialized (they are recreated
after reexec/reload instead). The destroyed units are not removed from
the cgroup_oom_queue. That means the queue may contain possibly invalid
pointers to released units.
Fix this by removing the units from cgroup_oom_queue as we do for
others. When at it, sync assert checks with currently existing queues
and put them in order in the manager cleanup code.
2021-08-05 10:35:20 -04:00
Dan Streetman
869f52f218
cgroup: do 'catchup' for unit cgroup inotify watch files
...
While reexec/reload, we drop the inotify watch on cgroup file(s), so
we need to re-check them in case they changed and we missed the event.
Fixes : #20198
2021-08-05 10:35:20 -04:00
Luca Boccassi
32a2ee2bb4
Merge pull request #20375 from yuwata/network-bridge-vlan-issue-20373
...
network: fix bridge and openvswitch issues
2021-08-05 11:18:03 +01:00
Yu Watanabe
d7799877a0
sd-dhcp6-client: do not ignore errors in client_receive_advertise()
...
This also adds several debug log messages.
2021-08-05 11:14:23 +01:00
Yu Watanabe
6178e2f889
core: wrap cgroup path with empty_to_root() in log messages
...
This fixes e.g. the following log message:
---
systemd[1]: -.slice: Failed to migrate controller cgroups from , ignoring: Read-only file system
---
2021-08-05 03:14:46 +09:00
Yu Watanabe
0cddb53c85
core/cgroup: fix error handling of cg_remove_xattr()
2021-08-05 03:13:48 +09:00
Yu Watanabe
801cf85935
Merge pull request #20377 from yuwata/network-bridge-fdb-20305
...
network: always append new bridge FDB entries
2021-08-05 02:44:24 +09:00
Yu Watanabe
c347a98272
network: ignore errors on unsetting master ifindex
...
Fixes #20241 .
2021-08-05 00:10:55 +09:00
Yu Watanabe
1171f3f030
network: ignore errors on setting bridge config
...
For some setups, kernel refuses to set bridge configs with -EOPNOTSUPP.
See kernel's rtnl_bridge_setlink() in net/core/rtnetlink.c.
Fixes #20373 .
2021-08-04 23:19:49 +09:00
Yu Watanabe
17d808a8bf
network: add comments
2021-08-04 23:03:27 +09:00
Yu Watanabe
63295b42ae
network: introduce UplinkInterface= in [IPv6SendRA]
2021-08-04 22:20:56 +09:00
Yu Watanabe
a254fab20d
network: use request queue to configure IPv6 RA engine
2021-08-04 22:19:14 +09:00