Yu Watanabe
6b07675d81
test-network: do not call networkctl if networkd is in failed state
...
Otherwise, networkd may be restarted by DBus and we may get wrong
results.
2024-01-06 14:48:18 +09:00
Yu Watanabe
10d670a3c1
test-network: introduce networkctl() and friends
2024-01-06 14:48:15 +09:00
Yu Watanabe
032fd10de8
test-network: use read_networkd_log() at one more place
2024-01-06 12:46:00 +09:00
Yu Watanabe
bd581438a1
test-network: sync journal before read
...
Otherwise, test cases that check journal entries, e.g. test_unit_file()
may fail.
2024-01-06 12:45:59 +09:00
Yu Watanabe
b82b4d258e
Merge pull request #30794 from poettering/parse-vsock-better
...
socket-util: add more careful parsers for AF_VSOCK cid/port
2024-01-06 11:16:19 +09:00
Yu Watanabe
7ba3e44651
udevadm: allow to override the default log level by environment variable
...
Previously, there was no way to override the log level for test and
test-builtin commands. Let's re-parse environment after setting the log
level to debug. Then, we can control the log level through environment
variable.
2024-01-06 08:30:58 +09:00
Yu Watanabe
976309db6a
Merge pull request #30796 from mrc0mmand/journalctl-namespaces
...
journalctl: provide shell completion for --namespace=
2024-01-06 08:30:31 +09:00
Yu Watanabe
0d1706b5fa
Merge pull request #30775 from yuwata/network-nexthop-is-ready
...
network: introduce nexthop_is_ready() helper function and use it
2024-01-06 08:27:35 +09:00
Yu Watanabe
92a39246ad
Merge pull request #30790 from poettering/null-creds-allow-with-tpm
...
creds: allow using NULL encryption if explicitly requested even if TPM is available, and add a comprehensive credential encryption/decrpytion test
2024-01-06 04:26:38 +09:00
Yu Watanabe
ff4240fc22
test: wait for verbose-success.service finished
...
Otherwise, the command 'echo' may not be invoked yet.
Follow-up for 25aa35d465 .
2024-01-05 13:08:10 +01:00
Yu Watanabe
115a09004e
test: fix typo
...
Follow-up for 995bf013a1 .
2024-01-05 19:08:12 +09:00
Yu Watanabe
c270e41f5e
man: fix typo
...
Follow-up for 7d93e4af80 .
2024-01-05 19:08:12 +09:00
Yu Watanabe
20a0aeb039
vpick: fix typo
...
Follow-up for 76511c1bd3 .
2024-01-05 19:08:12 +09:00
Yu Watanabe
d61df11fcd
login: noone -> no one
...
Follow-up for 59afe07c21 .
2024-01-05 19:08:12 +09:00
Yu Watanabe
e75c24c450
core/dbus-manager: fix typo
...
Follow-up for 84c01612de .
2024-01-05 19:08:12 +09:00
Yu Watanabe
9e44842a9a
string-util: fix typo
...
Follow-up for 63566c6b6f .
2024-01-05 19:08:12 +09:00
Yu Watanabe
56a89426f6
TODO: fix typo
...
Follow-up for 97c493f214 .
2024-01-05 19:08:12 +09:00
Yu Watanabe
2743854540
network: do not make the implied default have the first priority
...
Follow-up for b732606950 and
6706ce2fd2 .
If Network.ignore_carrier_loss_set flag is set, then the timeout value
is always used, hence the logic implemented by
b732606950 never worked.
2024-01-05 18:04:18 +09:00
Yu Watanabe
b87ffa9b5a
network/route: use nexthop_is_ready()
2024-01-05 05:33:49 +09:00
Yu Watanabe
ccc55b5ec5
network/nexthop: wait for requests for group members being processed
...
This also split out the check as nexthop_is_ready().
2024-01-05 05:33:49 +09:00
Yu Watanabe
338fb16ad5
network/nexthop: refuse id == 0 earlier
...
All requested nexthop has a non-zero ID.
2024-01-05 05:33:49 +09:00
Yu Watanabe
78265b5b4a
test-network: add test case about replacing nexthop
2024-01-05 04:00:16 +09:00
Yu Watanabe
9362f7d5b5
test-network: merge three tests for neighbor
...
To speed up tests.
2024-01-05 04:00:16 +09:00
Yu Watanabe
dc60ac2960
test-network: show monotonic timestamp and drop hopstname from logs
2024-01-05 04:00:16 +09:00
Yu Watanabe
4855d82348
Merge pull request #30739 from poettering/pam-util-many
...
pam-util: add pam_get_item_many() to shorten some code
2024-01-04 23:28:34 +09:00
Yu Watanabe
7903567cb7
Merge pull request #30610 from YHNdnzj/logind-serialize-pidref
...
logind: serialize session leader pidfd to fdstore
2024-01-04 23:25:18 +09:00
Yu Watanabe
18c4c5d84f
network/route: make the route section invalid when an invalid MTUBytes= is specified
...
We usually set the invalid flag for a section if a setting in the section has
an invalid value. Let's also do the same thing for MTUBytes= in [Route].
2024-01-04 23:18:28 +09:00
Yu Watanabe
f475584ebf
network/netdev: call done() per netdev kind before freeing netdev name or so
...
Otherwise, log_netdev_xyz() does not provide netdev name if it is called
in done(). It is hard to debug.
This should not change any effective behavior, at least with the current
implementation of done() per netdev kind.
2024-01-04 20:34:14 +08:00
Yu Watanabe
82a1597778
Merge pull request #28797 from Werkov/eff_limits
...
Add MemoryMaxEffective=, MemoryHighEffective= and TasksMaxEff… …ective= properties
2024-01-04 05:38:06 +09:00
Yu Watanabe
f3f6c65618
Merge pull request #30710 from YHNdnzj/logind-ret-gather
...
logind-session: modernization
2024-01-04 05:25:41 +09:00
Yu Watanabe
124c712692
Merge pull request #30532 from yuwata/udev-extend-timeout-kill-worker
...
udev: extend timeout to prevent kill worker
2024-01-04 05:21:50 +09:00
Yu Watanabe
aea57b1415
Merge pull request #28836 from msekletar/aux-scope
...
core/manager: add dbus API to create auxiliary scope from running service
2024-01-04 04:52:39 +09:00
Yu Watanabe
04d4086c22
resolve/mdns: do not append goodby packet entries to known answers section
...
When we receive a goodby packet about a host, and we have a cache entry about
the host, we do not immediately remove the cache entry, but update it with TTL 1.
See RFC 6762 section 10.1 and 3755027c2c .
If we receive a request soon after the goodby packet, previously the
entry was included in the known answers section of the reply. But such
information should not be appended.
Follow-up for 3755027c2c .
2024-01-03 13:16:43 +01:00
Yu Watanabe
dd8ab4a206
sd-dhcp-server: rename DHCPLease -> sd_dhcp_server_lease
...
Then, move basic functions for the object to sd-dhcp-server-lease.[ch].
No effective funcional changes.
2024-01-03 15:20:31 +09:00
Yu Watanabe
95c48613f4
sd-dhcp-server: use sd_dhcp_client_id
2024-01-03 15:20:31 +09:00
Yu Watanabe
12fb1fc5dd
Merge pull request #30702 from yuwata/sd-dhcp-client-id
...
dhcp: introduce sd_dhcp_client_id and relevant functions
2024-01-03 15:10:46 +09:00
Yu Watanabe
778823fd52
backlight: supprt ID_LEDS_CLAMP udev property for leds subsystem devices
...
Closes #30507 .
2024-01-03 09:30:41 +09:00
Yu Watanabe
e0feaedbd9
udev/dmi-memory-id: update table with latest SMBIOS specification
...
Closes #30699 .
2024-01-03 08:43:17 +09:00
Yu Watanabe
7e08a337b2
Merge pull request #30700 from yuwata/storagetm-fixlets
...
storagetm: several trivial fixlets
2024-01-03 08:42:58 +09:00
Yu Watanabe
cb0a3b8c14
network/route: drop TTL propagate support for MPLS routes
...
This effectively reverts 9b88f20aba .
We do not support MPLS routes, only IPv4 or IPv6 routes are supported.
2024-01-03 08:41:53 +09:00
Yu Watanabe
6ba147485e
network/queue: fix potential double-free on oom
...
Currently, link_queue_request_safe(), which is a wrapper of
request_new(), is called with a free function at
- link_request_stacked_netdev() at netdev/netdev.c,
- link_request_address() at networkd-address.c,
- link_request_nexthop() at networkd-nexthop.c,
- link_request_neighbor() at networkd-networkd.c.
For the netdev case, the reference counter of the passed object is increased
only when the function returns 1. So, on failure (with -ENOMEM)
previously we unexpectedly dropped the reference of the NetDev object.
Similarly, for Address and friends, the ownership of the object is moved to the
Request object only when the function returns 1. And on failure, previously
the object was freed twice.
Also, netdev_queue_request(), which is another wrapper of request_new()
potentially leaks memory when the same NetDev object is queued twice.
Fortunately, that should not happen as the function is called only once
per object.
This fixes the above issue, and now the ownership or the reference
counter of the object is changed only when it is succeeded with 1.
2024-01-03 08:41:36 +09:00
Yu Watanabe
ff49e703ff
Merge pull request #30691 from yuwata/resolve-ipv6
...
resolve: do not listen to IPv6 when disabled by sysctl
2024-01-03 08:41:14 +09:00
Yu Watanabe
d59a2b3bf5
sd-dhcp-lease: use sd_dhcp_client_id
2024-01-03 06:06:39 +09:00
Yu Watanabe
1809132064
dhcp: move sd_dhcp_client_id_to_string() to sd-dhcp-client-id.[ch]
...
Then, this makes it take sd_dhcp_client_id object, and introduce
sd_dhcp_client_id_to_string_from_raw().
2024-01-03 06:06:36 +09:00
Yu Watanabe
6efa51f862
dhcp: introduce sd_dhcp_client_id and relevant functions
...
This splits out client ID handling from sd-dhcp-client.c to
sd-dhcp-client-id.[ch]. This will be used later in other places.
2024-01-03 06:06:34 +09:00
Yu Watanabe
69f4a87c8c
storagetm: fix use of wrong stat element
2024-01-03 05:19:00 +09:00
Yu Watanabe
30c1cded77
storagetm: always hash stat.st_mode
...
To make the hash function consistent with the compare function.
2024-01-03 05:07:43 +09:00
Yu Watanabe
f22b586a21
network/address: introduce address_remove_and_cancel()
...
Then, replace address_remove_and_drop() with it.
If an address is requested, and the request is already called,
we may not received its reply and notification from the kernel, and
the corresponding address object may not be remmbered. Even in such
case, we need to remove the address, otherwise the address will come
later after the function called.
2024-01-03 04:43:34 +09:00
Yu Watanabe
f1b73dbbc9
network/address: not necessary to remmber address before remove
2024-01-03 04:43:34 +09:00
Yu Watanabe
7f74b00ab0
network/address: make address_remove() take Link object that the address assigned to
...
No functional change. Preparation for later commits.
2024-01-03 04:43:34 +09:00
Yu Watanabe
5592608bdc
test: update test case for failed udev event
2024-01-03 04:23:26 +09:00
Yu Watanabe and sushmbha
b16c6076cb
udev: wait for an extra time before the manager kills workers
...
Otherwise, udev workers cannot detect slow programs invoked by
IMPORT{program}=, PROGRAM=, or RUN=, and whole worker process may be
killed.
Fixes #30436 .
Co-authored-by: sushmbha <sushmita.bhattacharya@oracle.com >
2024-01-03 04:23:22 +09:00
Yu Watanabe
11706971e8
udev-spawn: skip executing RUN= if exec_delay= is too long
...
To prevent the worker process killed by the manager.
2024-01-03 04:23:18 +09:00
Yu Watanabe
406c96e329
udev-spawn: refuse to spawn commands if the event already takes too long
...
Also, calculate the timeout for warning based on the remaining time for
the timeout of the event, rather than the timeout itself.
Currently, udev manager kills the worker if the timeout exceeds. So,
this does not change anything except for the timing of the warning.
Just refactoring and preparation for later commits.
2024-01-03 04:23:12 +09:00
Yu Watanabe
ef4e0b7e4f
sd-netlink: introduce sd_rtnl_message_route_set_tos()
...
We already have the getter for the parameter, but forgot to introduce the setter.
2024-01-03 04:21:51 +09:00
Yu Watanabe
8f8b39c86b
sd-netlink: move definitions of RTA_TYPE() and RTA_FLAGS() to netlink-util.h
2024-01-03 04:21:28 +09:00
Yu Watanabe
6e6b59ed00
unit: order systemd-resolved after systemd-sysctl
...
Otherwise, IPv6 enable/disable setting may be changed after resolved is
started.
2024-01-03 04:07:15 +09:00
Yu Watanabe
a53082f07d
resolve: do not listen to IPv6 when disabled by sysctl
...
Fixes #30669 .
2024-01-03 04:03:30 +09:00
Yu Watanabe
e40a67809b
Merge pull request #30689 from mrc0mmand/even-more-cocci-tweaks
...
coccinelle: drop a couple of FIXMEs
2024-01-03 03:25:30 +09:00
Yu Watanabe
83a0417550
sd-journal: introduce cleanup function and hash ops for Directory
...
This makes the folloing:
- Each Directory object now has a reference to sd-journal.
- Hence, directory_free(), which is renamed from remove_directory(), can
be called without sd-journal as an argument.
- Introduces hash ops for Directory, so the finalization becomes
slightly simpler.
- Allocate hashmaps that store Directory objects when necessary.
- Split out add_directory_impl().
No functional changes, just refactoring.
2024-01-01 19:29:04 +01:00
Yu Watanabe
2d0be462d6
Merge pull request #30656 from mrc0mmand/dfuzzer-shenanigans
...
test: avoid starting/stopping unwanted units during fuzzing
2023-12-31 04:52:15 +09:00
Yu Watanabe
73780aa8a3
resolve: DnsTransaction.scope may be NULL when dns_transaction_close_connection() is called
...
Follow-up for ac1b7b9e19 .
Fixes CID#1533020.
2023-12-31 04:51:59 +09:00
Yu Watanabe
d05649ca7d
resolve: add several comments for DNS type table
...
Also update compile time checks.
Follow-up for 818bb6f482 .
2023-12-31 04:51:42 +09:00
Yu Watanabe
e6bca18296
Merge pull request #30658 from jnohlgard/udevadm-lock-return-code
...
udevadm: Propagate return code from verb result
2023-12-31 04:51:09 +09:00
Yu Watanabe
13a30c6dc4
test: add simple coverage tests for 'udevadm lock'
2023-12-30 05:28:04 +09:00
Yu Watanabe
5b201ffb1e
sd-journal: check sd-event state before setting up post change timer
...
The similar check already exists in schedule_post_change().
The function is currently called at two places.
- journal_file_open() in sd-journal:
In this case, if the timer is not set up, then journal_file_post_change()
will be called at the end of journal_file_append_entry(). So, the necessary
task will be done sequentially when an journal entry is stored to the opened
journal file. That is desired when the function is called at outside of the
event loop.
- server_open_journal() in journald:
This is not called after we exit the event loop.
So, we can safely do nothing in the function if the event loop is being
finished or already finished.
Fixes #30644 .
2023-12-29 06:39:06 +09:00
Yu Watanabe
0802e9d8de
coccinelle: re-indent comments
2023-12-29 04:14:55 +09:00
Yu Watanabe
a1ccd5eed8
coccinelle: fix typo
...
Follow-up for b25d3b36a2 .
2023-12-29 04:13:45 +09:00
Yu Watanabe
568fd8a63b
Merge pull request #30649 from YHNdnzj/close-nointr-unnecessary
...
Some modernization/cleanup for fd-util
2023-12-29 04:03:15 +09:00
Yu Watanabe
1a4b0459f6
network/address: unconditionally check if address is ready
...
Previously, we checked if the address is ready only when it is an IPv6
address. But, IPv4 address never enter tentative state, hence the check
for an IPv4 address is effectively equivalent to the one for IPv6.
So, let's unify the check. This does not change any effective behavior.
2023-12-28 07:08:37 +09:00
Yu Watanabe
3a30d81238
Merge pull request #30643 from bluca/completion
...
bash completion additions for systemctl/systemd-analyze
2023-12-28 04:10:20 +09:00
Yu Watanabe
9e7cd6bed1
Merge pull request #30641 from YHNdnzj/hibernation-device
...
Follow-ups for hibernate-util
2023-12-28 04:09:55 +09:00
Yu Watanabe
f1f494f3f8
Merge pull request #30634 from dtardon/docbook-valid-3
...
DocBook validation fixes (part 3)
2023-12-28 04:06:57 +09:00
Yu Watanabe
51dfa75c6e
Merge pull request #30639 from mrc0mmand/more-cocci-shenanigans
...
Another batch of Coccinelle tweaks
2023-12-27 20:33:46 +09:00
Yu Watanabe
5a4631bd8f
coccinelle: fix typo
2023-12-26 09:43:21 +09:00
Yu Watanabe
fe3fcb9492
Merge pull request #30633 from mrc0mmand/cocci-shenanigans
...
coccinelle: rework how we run the Coccinelle transformations
2023-12-26 05:45:58 +09:00
Yu Watanabe
372acaad58
network: use RET_GATHER() macro
2023-12-25 22:02:14 +08:00
Yu Watanabe
f089d3ebd5
network/address: move post-processes on address removal to address_drop()
...
For consistency with other follow-up processes after address removal.
No functional change, just refactoring and preparation for later
commits.
2023-12-25 20:19:40 +09:00
Yu Watanabe
8ae3a4f5e2
network/address: also drop reference for DHCP server address
...
The Address object should never freed after it is referenced.
So, this should not change any behavior. Just for safety.
2023-12-25 20:19:40 +09:00
Yu Watanabe
287a5f1cff
Merge pull request #30628 from YHNdnzj/format-table-improvement
...
Some improvements for format-table
2023-12-25 20:01:32 +09:00
Yu Watanabe
f73509d90f
Merge pull request #30616 from dtardon/docbook-valid-2
...
DocBook validation fixes (part 2)
2023-12-25 20:00:23 +09:00
Yu Watanabe
c6f7c8acd9
Merge pull request #30607 from dtardon/docbook-improvements
...
Minor improvements to man pages
2023-12-25 19:34:55 +09:00
Yu Watanabe
c01a5c0527
siphash24: introduce siphash24_compress_typesafe() macro
...
To prevent copy-and-paste mistake.
This also introduce in_addr_hash_func().
No functional change, just refactoring.
2023-12-25 15:38:59 +09:00
Yu Watanabe
11c36161fa
Merge pull request #30621 from yuwata/coccinelle
...
coccinelle: convert hashmap_size() == 0 and friends
2023-12-25 02:38:42 +09:00
Yu Watanabe
ab84005cb2
github: bump version in template
2023-12-25 02:23:14 +09:00
Yu Watanabe
07e8c3055d
tree-wide: drop several doubled space
2023-12-25 02:13:49 +09:00
Yu Watanabe
b3a9d980f3
tree-wide: drop space between variable and an increment/decrement
2023-12-25 01:56:40 +09:00
Yu Watanabe
1d03d970a1
tree-wide: insert space after for and switch
2023-12-25 01:29:38 +09:00
Yu Watanabe
6ae5d4b52f
coccinelle: convert hashmap_size() == 0 or friends
...
Addresses https://github.com/systemd/systemd/pull/30567#issuecomment-1866631816 .
2023-12-25 00:47:42 +09:00
Yu Watanabe
54cbad304c
sd-device: shorten code a big
...
Suggested by coccinelle.
2023-12-25 00:47:42 +09:00
Yu Watanabe
902279f0e4
Merge pull request #30620 from mrc0mmand/more-test-tweaks
...
test: a couple of fixes for failing tests
2023-12-25 00:19:14 +09:00
Yu Watanabe
891e81edf4
Merge pull request #30615 from dtardon/docbook-valid-1
...
DocBook validation fixes (part 1)
2023-12-24 19:27:26 +09:00
Yu Watanabe
eb1a51b869
udev: make UdevEvent take reference to UdevWorker
...
Many functions take timeout_usec and friends, but those are equivalent
to the Worker elements.
No functional change, just refactoring.
2023-12-24 17:20:23 +09:00
Yu Watanabe
0df87a4037
udev: call udev_watch_end() before udev_event_execute_rules()
...
No functional change, just refactoring.
2023-12-24 17:20:23 +09:00
Yu Watanabe
48e06208ce
Merge pull request #30609 from YHNdnzj/analyze-fdstore
...
analyze-fdstore: minor fixups
2023-12-24 06:44:31 +09:00
Yu Watanabe
36013380a9
core/executor: use log level specified in LogLevelMax=
...
Follow-up for cc9f4cad8c .
Otherwise, still unexpected lines may be logged by executor.
2023-12-24 06:44:03 +09:00
Yu Watanabe
08ba85c71e
systemctl: swap cached_id_map and cached_name_map at one more place
...
Follow-up for 2962a50850 .
Fortunately, this does not change any behavior.
Replaces #30601 .
Fixes CID#1532831.
2023-12-24 03:41:09 +09:00
Yu Watanabe
d24d9a3786
Merge pull request #30604 from mrc0mmand/test-journal-shenanigans
...
test: redirect stdout/stderr of TEST-04-JOURNAL to console as well
2023-12-24 03:40:50 +09:00
Yu Watanabe
c4d501d060
Merge pull request #30587 from mrc0mmand/test-stuff
...
test: slightly extend uid0's coverage
2023-12-24 03:40:22 +09:00
Yu Watanabe
b6c424a2f2
Merge pull request #30049 from yuwata/assert-return-critical
...
test: make assert_return() critical by default
2023-12-24 03:39:18 +09:00