Lennart Poettering [Thu, 22 Aug 2024 16:20:20 +0000 (18:20 +0200)]
boot: use MAX() where appropriate
Yu Watanabe [Thu, 22 Aug 2024 20:25:19 +0000 (05:25 +0900)]
Merge pull request #34097 from YHNdnzj/journal-browse-prepare
shared/logs-show: introduce journal_browse_prepare()
Mike Yuan [Sat, 17 Aug 2024 17:53:09 +0000 (19:53 +0200)]
shared/logs-show: introduce journal_browse_prepare()
which combines sigbus_install() and bumping fd limit.
Mike Yuan [Sat, 17 Aug 2024 17:40:55 +0000 (19:40 +0200)]
basic/sigbus: use FOREACH_ELEMENT where appropriate, assert >= 0 for success
Daan De Meyer [Thu, 22 Aug 2024 13:22:37 +0000 (15:22 +0200)]
mkosi: Update to latest
Should fix the Fedora Rawhide CI failure.
Lennart Poettering [Wed, 21 Aug 2024 08:10:34 +0000 (10:10 +0200)]
man: document .membership files that nss-systemd processes
This has been a glaring omission the docs: when people create
.user/.group/.user-privileged/.group-privileged drop-in files, they
should also create matching .membership files.
Yu Watanabe [Thu, 22 Aug 2024 11:21:33 +0000 (20:21 +0900)]
Merge pull request #34051 from rpigott/resolved-demote-fallback
resolved: demote only the fallback servers in the global scope
Daan De Meyer [Thu, 22 Aug 2024 10:57:07 +0000 (12:57 +0200)]
Merge pull request #34033 from DaanDeMeyer/mkosi-cage
mkosi: Update to latest
Daan De Meyer [Mon, 19 Aug 2024 09:27:26 +0000 (11:27 +0200)]
mkosi: Update to latest
Lennart Poettering [Thu, 22 Aug 2024 08:56:53 +0000 (10:56 +0200)]
Merge pull request #34076 from yuwata/polkit-message
polkit: add missing period in polkit messages
Daan De Meyer [Mon, 19 Aug 2024 09:27:11 +0000 (11:27 +0200)]
mkosi: Improve formatting
Yu Watanabe [Thu, 22 Aug 2024 04:59:55 +0000 (13:59 +0900)]
Merge pull request #34079 from AdrianVovk/sysupdate-fixups
systemd-sysupdated follow-ups
Adrian Vovk [Thu, 22 Aug 2024 02:10:49 +0000 (22:10 -0400)]
sysupdate: man: Cleanup sections about flags
Adrian Vovk [Thu, 22 Aug 2024 01:44:53 +0000 (21:44 -0400)]
sysupdate: Simplify sysupdate_run_simple callsite
Allows the caller to optionally pass in a target, instead of making
everyone call target_get_argument at the call site.
Adrian Vovk [Thu, 22 Aug 2024 01:36:25 +0000 (21:36 -0400)]
sysupdated: Verify inputs more rigorously
Also return better errors
Adrian Vovk [Thu, 22 Aug 2024 01:35:25 +0000 (21:35 -0400)]
sysupdated: Fixup redundant constant name
SD_ stands for systemd, so SD_SYSTEMD_* is SYSTEMD_SYSTEMD_*
Adrian Vovk [Wed, 21 Aug 2024 20:15:24 +0000 (16:15 -0400)]
sysupdated: Fixup minor formatting issues
Yu Watanabe [Wed, 21 Aug 2024 21:43:32 +0000 (06:43 +0900)]
labeler: add more rules
Yu Watanabe [Wed, 21 Aug 2024 22:17:10 +0000 (07:17 +0900)]
Merge pull request #34072 from yuwata/networkd-routing-policy-rule-follow-up
network/routing-policy-rule: follow up for recent change
Yu Watanabe [Wed, 21 Aug 2024 22:10:47 +0000 (07:10 +0900)]
po: update Japanese translations
Yu Watanabe [Wed, 21 Aug 2024 22:08:05 +0000 (07:08 +0900)]
polkit: add missing period in messages
Yu Watanabe [Wed, 21 Aug 2024 20:02:56 +0000 (05:02 +0900)]
po: update Japanese translations
Adrian Vovk [Wed, 21 Aug 2024 19:35:34 +0000 (15:35 -0400)]
Merge pull request #32363 from CodethinkLabs/sysupdate-dbus
sysupdate: Implement dbus service
Yu Watanabe [Wed, 21 Aug 2024 19:34:11 +0000 (04:34 +0900)]
Merge pull request #34053 from YHNdnzj/follow-ups
Two follow-ups for recent PRs
Alyssa Ross [Wed, 21 Aug 2024 12:21:47 +0000 (14:21 +0200)]
bootctl: don't load etc/machine-info from cwd
arg_root defaults to null, so if --root isn't given, this would try reading
etc/machine-info from the current working directory, which is likely to fail.
Fixes:
77db9ef2ab ("boot: Make sure we take --root into account everywhere.")
A. Wilcox [Wed, 21 Aug 2024 14:35:58 +0000 (09:35 -0500)]
man: Ensure notify example includes <string.h>
This ensures that memcpy and strerror are defined. This is especially
important with GCC 14 as implicit function declarations are now an error.
Yu Watanabe [Wed, 21 Aug 2024 17:08:20 +0000 (02:08 +0900)]
hwdb: rename hwdb_bin_paths -> HWDB_BIN_PATHS
We usually use upper letters for constant definitions.
Ivan Shapovalov [Wed, 21 Aug 2024 17:36:08 +0000 (19:36 +0200)]
core/exec-invoke: document calling setpriority() after sched_setattr()
Fixes:
711a157738b ("core/exec-invoke: call setpriority() after sched_setattr()")
Yu Watanabe [Wed, 21 Aug 2024 19:20:51 +0000 (04:20 +0900)]
test-network: also test routing policy rules are configured as expected after reconfiguration
For issue #34068.
Yu Watanabe [Wed, 21 Aug 2024 19:16:09 +0000 (04:16 +0900)]
test-network: find routing policy rule by priority
We usually configure a test rule with a unique priority. Hence, finding
rule by priority reduces the lines of output, and we can debug easily.
Also print short comments on check. That's helpful when the check is
called several times.
Yu Watanabe [Wed, 21 Aug 2024 19:11:52 +0000 (04:11 +0900)]
network/routing-policy-rule: use address family of existing rule when judging if existing rule can be updated
Otherwise, the other RoutingPolicyRule object may not have a valid
address family yet, and the existing rule may be wrongly handled as
that it is not requested by any interface, and it may be removed.
Follow-up for
727235006a7e8904f8493d32376cffa6969c5fa9.
Fixes #34068.
Ronan Pigott [Wed, 21 Aug 2024 14:49:59 +0000 (07:49 -0700)]
resolved: demote the fallback dns servers
This softens the behavior originally introduced in
eded61e410df to apply
only to the fallback dns servers.
The intent is that the global FallbackDNS (instead of DNS) can now be
used in conjunction with the per-link dns, providing a fallback behavior
without introducing a scope overlap.
References:
eded61e410df (resolved: demote the global unicast scope, 2024-08-19)
Ronan Pigott [Tue, 20 Aug 2024 17:25:28 +0000 (10:25 -0700)]
resolved: use the fallback servers when no default dns is configured
This expands the role of fallback servers so they are applied not only
when there are no dns servers configured, but when all the configured
dns servers are configured only for non-default-route links.
Ronan Pigott [Wed, 21 Aug 2024 16:41:35 +0000 (09:41 -0700)]
resolved: introduce link_set_default_route
Ronan Pigott [Wed, 21 Aug 2024 16:36:13 +0000 (09:36 -0700)]
resolved: introduce dns_server_is_fallback
Yu Watanabe [Wed, 21 Aug 2024 16:34:35 +0000 (01:34 +0900)]
Merge pull request #34055 from whot/wip/eviocrevoke-warnings
Update warnings for failed EVIOCREVOKE invocations
Yu Watanabe [Wed, 21 Aug 2024 16:22:29 +0000 (01:22 +0900)]
Merge pull request #34054 from yuwata/network-failed-state
network: several fixlets for reconfiguration after entered failed state
Yu Watanabe [Wed, 21 Aug 2024 06:31:57 +0000 (15:31 +0900)]
networkctl: split networkctl.c into small pieces
No functional change, just refactoring.
Daan De Meyer [Wed, 21 Aug 2024 15:19:09 +0000 (17:19 +0200)]
Merge pull request #33498 from DaanDeMeyer/btrfs
repart: Allow Subvolumes= when running offline
Ronan Pigott [Wed, 21 Aug 2024 13:59:22 +0000 (06:59 -0700)]
Revert "resolved: demote the global unicast scope"
This commit may have been a breaking change for sd-resolved foreign
resolv.conf mode, where a legacy network management daemon directly
modifies resolv.conf and sd-resolved consumes that.
This reverts commit
eded61e410dfa6c16ae68cb624c58122fb18fd0e.
Mike Yuan [Tue, 20 Aug 2024 18:04:46 +0000 (20:04 +0200)]
process-util: always retry with pidfd_spawn() w/o cgroup first
Follow-up for
7ac58157ca67ab001307f1fd72e0cc7c0c4e846a
With the mentioned commit, iff E2BIG we'd retry pidfd_spawn()
with POSIX_SPAWN_SETCGROUP disabled. However, the same strategy
should actually apply to EOPNOTSUPP/ENOSYS/EPERM too -
they can mean two things here: no clone3() or no CLONE_PIDFD.
Therefore, let's first try clone() + CLONE_PIDFD, and fall further back
to plain clone() (posix_spawn()) only as last resort. Plus, record
the fact so that we don't unnecessarily retry every single time
if CLONE_PIDFD is the one that's unavailable.
Mike Yuan [Tue, 20 Aug 2024 20:01:09 +0000 (22:01 +0200)]
process-util: check the flag instead of 'cgroup' param
We might skip CLONE_INTO_CGROUP wholly if not supported.
Mike Yuan [Tue, 20 Aug 2024 10:32:57 +0000 (12:32 +0200)]
man: use standard-options for --no-ask-password everywhere
Daan De Meyer [Wed, 21 Aug 2024 09:25:46 +0000 (11:25 +0200)]
Revert "cgroup-util: Don't try to open pidfd for kernel threads"
The kernel patch was reverted so let's try again to open pidfds
for kernel threads.
This reverts commit
ead48ec35c863650944352a3455f26ce3b393058.
Luca Boccassi [Wed, 21 Aug 2024 10:46:37 +0000 (12:46 +0200)]
Merge pull request #34049 from yuwata/network-routing-policy-rule
network: further rework for routing policy rule
Daan De Meyer [Wed, 26 Jun 2024 18:33:06 +0000 (20:33 +0200)]
repart: Allow Subvolumes= and DefaultSubvolume= when running offline
mkfs.btrfs has recently learned new options --subvol and --default-subvol
so let's stop failing when Subvolumes= and DefaultSubvolume= are used offline
and use the new --subvol and --default-subvol options instead to create subvolumes
in the generated root filesystem without root privileges or loop devices.
Daan De Meyer [Wed, 14 Aug 2024 15:31:30 +0000 (17:31 +0200)]
repart: Don't add same dir to MakeDirectories= or Subvolumes= twice
Daan De Meyer [Thu, 8 Aug 2024 18:16:55 +0000 (20:16 +0200)]
repart: Constify partition_needs_populate()
Daan De Meyer [Wed, 26 Jun 2024 18:32:13 +0000 (20:32 +0200)]
repart: Use loop_device_error_is_fatal() in one more place
Tom Coldrick [Thu, 20 Jun 2024 09:26:24 +0000 (10:26 +0100)]
sysupdate: Add integration test for updatectl updates
Adrian Vovk [Fri, 14 Jul 2023 00:23:12 +0000 (20:23 -0400)]
sysupdate: Implement updatectl
This is the command-line tool to manage systemd-sysudpated
Co-authored-by: Tom Coldrick <thomas.coldrick@codethink.co.uk>
Co-authored-by: Abderrahim Kitouni <abderrahim.kitouni@codethink.co.uk>
Adrian Vovk [Fri, 30 Jun 2023 02:58:41 +0000 (22:58 -0400)]
sysupdate: Implement systemd-sysupdated dbus service
Co-authored-by: Tom Coldrick <thomas.coldrick@codethink.co.uk>
Co-authored-by: Abderrahim Kitouni <abderrahim.kitouni@codethink.co.uk>
Peter Hutterer [Mon, 12 Aug 2024 04:05:13 +0000 (14:05 +1000)]
logind: warn about EVIOCREVOKE errors other than EINVAL too
EINVAL means the kernel doesn't support it, ENODEV means it's
already revoked or the device is no longer there which has the same
effect anyway. All others - let's print an error to the logs.
Yu Watanabe [Wed, 21 Aug 2024 01:47:09 +0000 (10:47 +0900)]
network/ipv4acd: adjust comment and logging
Yu Watanabe [Wed, 21 Aug 2024 01:31:34 +0000 (10:31 +0900)]
sd-dhcp-client: actually restart daemon after sending DECLINE message
client_stop() sets DHCP_STATE_STOPPED to client->state, thus the server
never restarted.
Yu Watanabe [Wed, 21 Aug 2024 01:24:44 +0000 (10:24 +0900)]
sd-dhcp-client: stop client without calling notification after sending RELEASE
Otherwise, even the acquired lease is released, the client may be in
e.g. BOUND state or so, and may send renew or rebind after timeout
later.
Yu Watanabe [Wed, 21 Aug 2024 01:23:06 +0000 (10:23 +0900)]
sd-dhcp-client: refuse to send RELEASE or friends gracefully when the daemon is stopped or so
We can easily hit the assertions without checking the internal states of
the DHCP client before calling these functions. That's annoying.
Let's do more gracefully.
Yu Watanabe [Wed, 21 Aug 2024 02:24:14 +0000 (11:24 +0900)]
sd-dhcp-client: do not call callback with SD_DHCP_CLIENT_EVENT_STOP if already stopped
When an interface enters the failed state, even if the DHCP client is
stopped, the acquired DHCP lease is not unreferenced, as the callback
dhcp4_handler() do nothing in that case. When the failed interface is
being reconfigured after that, the DHCP client is stopped again
(though it is already stopped), and SD_DHCP_CLIENT_EVENT_STOP event is
triggered and sd_dhcp_client_send_release() is called, and the
assertion in the function is triggered.
E.g.
===
systemd-networkd[98588]: wlp59s0: DHCPv4 address 192.168.86.250/24, gateway 192.168.86.1 acquired from 192.168.86.1
systemd-networkd[98588]: wlp59s0: Could not set DHCPv4 route: Nexthop has invalid gateway. Network is unreachable
systemd-networkd[98588]: wlp59s0: Failed
systemd-networkd[98588]: wlp59s0: State changed: configuring -> failed
systemd-networkd[98588]: wlp59s0: The interface entered the failed state frequently, refusing to reconfigure it automatically.
systemd-networkd[98588]: wlp59s0: DHCPv4 client: STOPPED
systemd-networkd[98588]: wlp59s0: DHCPv4 client: State changed: bound -> stopped
systemd-networkd[98588]: Got message type=method_call sender=:1.449 destination=org.freedesktop.network1 path=/org/freedesktop/network1 interface=org.freedesktop.network1.Manager member=ReconfigureLink ...
systemd-networkd[98588]: wlp59s0: State changed: failed -> initialized
systemd-networkd[98588]: wlp59s0: found matching network '/etc/systemd/network/50-wifi.network'.
systemd-networkd[98588]: wlp59s0: Configuring with /etc/systemd/network/50-wifi.network.
systemd-networkd[98588]: wlp59s0: DHCPv4 client: STOPPED
systemd-networkd[98588]: Assertion 'sd_dhcp_client_is_running(client)' failed at src/libsystemd-network/sd-dhcp-client.c:2197, function sd_dhcp_client_send_release(). Aborting.
===
Yu Watanabe [Tue, 20 Aug 2024 22:07:05 +0000 (07:07 +0900)]
network: log and enter failed state in link_reconfigure()
No functional change, just refactoring.
Yu Watanabe [Tue, 20 Aug 2024 22:01:47 +0000 (07:01 +0900)]
network: enter initialized state when the interface will be reconfigured
When the interface is in the failed state, link_getlink_handler_internal()
will do nothing and return zero, thus the interface will not be
reconfigured, especially when the reconfiguration is triggered in
link_enter_failed().
Follow-up for
c2eb7753dd47ec04ae0d66400e70bc87fbf1adcc.
Yu Watanabe [Tue, 20 Aug 2024 22:17:19 +0000 (07:17 +0900)]
network: introduce reconfigure_data_free() and _freep()
No functional change, just refactoring.
Yu Watanabe [Tue, 20 Aug 2024 17:05:22 +0000 (02:05 +0900)]
Merge pull request #34018 from yuwata/network-address-label
network: allow to configure IPv6 address label in networkd.conf
Kornilios Kourtis [Thu, 15 Aug 2024 15:22:35 +0000 (17:22 +0200)]
process-util: handle pidfd_spawn() returning E2BIG
In some kernels (specifically, 5.4) even though the clone3 syscall is
supported, setting CLONE_INTO_CGROUP is not. The error message returned
in this case is E2BIG.
If posix_spawn_wrapper encounters this error, it does not retry, and
cannot spawn any programs in said kernels.
This commit adds a check for the E2BIG error and retries pidfd_spawn()
without the POSIX_SPAWN_SETCGROUP flag.
If we encounter an E2BIG error, and the pidfd_spawn() succeeds after
removing the POSIX_SPAWN_SETCGROUP flag, then we cache the result so
that we do not retry every time.
Originally, this issue was reported in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=
1077204.
Signed-off-by: Kornilios Kourtis <kornilios@gmail.com>
Daan De Meyer [Tue, 20 Aug 2024 12:39:45 +0000 (14:39 +0200)]
tests: Don't override QemuKvm= value if TEST_NO_KVM=0
Let's disable KVM if TEST_NO_KVM=1 is set but let's not specify anything
if it's not set so the QemuKvm= setting from mkosi.conf is used.
Yu Watanabe [Tue, 20 Aug 2024 01:33:42 +0000 (10:33 +0900)]
test-network: add test for ManageForeignRoutingPolicyRules=
Yu Watanabe [Tue, 20 Aug 2024 01:07:10 +0000 (10:07 +0900)]
test-network: add tests for Type=table, goto, and nop
Yu Watanabe [Tue, 20 Aug 2024 11:56:35 +0000 (20:56 +0900)]
test-network: do not pass '[detached]' to 'ip rule del'
That indicates the interface name in 'iif' or 'oif' cannot be resolved
when 'ip rule' command is invoked. That's natural when networkd fail to
remove rule but the corresponding interface is already removed.
To make not the residual rules interfere subsequent test cases, let's
ignore the flag and actually remove unwanted rules.
Yu Watanabe [Mon, 19 Aug 2024 20:16:53 +0000 (05:16 +0900)]
network/routing-policy-rule: support all known type of rule
This also adds GoTo= to specify the target priority of goto rule.
Note, table was the default but could not be specified in Type=.
Yu Watanabe [Mon, 19 Aug 2024 22:00:44 +0000 (07:00 +0900)]
network/routing-policy-rule: also manage remaining attributes
Currently, these attributes are not configured by us, but there may be a
existing rule created by user manually with one of these attribute.
To correctly manage such foreign rules, let's read these attributes.
Yu Watanabe [Mon, 19 Aug 2024 21:56:53 +0000 (06:56 +0900)]
sd-netlink: introduce sd_netlink_message_read_u64()
Yu Watanabe [Mon, 19 Aug 2024 21:19:46 +0000 (06:19 +0900)]
network/routing-policy-rule: remove rules that have conflicting flags
The kernel does not distinguish rules with different flags in
rule_exists(), but the flags of an existing rule cannot be updated.
Let's remove rules that have conflicting flags, and configure new rules
later with requested flags.
Yu Watanabe [Mon, 19 Aug 2024 19:11:19 +0000 (04:11 +0900)]
network/routing-policy-rule: anyway detach rule even when we fail to remove it
When we fail to remove a rule, that mostly means the rule does not exist
in the kernel anymore, e.g. already removed manually and we have not
received notification about that yet.
Let's detach the rule in that case.
Yu Watanabe [Mon, 19 Aug 2024 19:02:46 +0000 (04:02 +0900)]
network/routing-policy-rule: do not save rule to Manager before it is configured
Otherwise, if we fail to configure the rule, then the manager will keep
nonexistent rule forever. So, let's first copy the rule and put it on
Request, then on success generate a new copy based on the netlink
notification and store it to Manager.
This is the same as
0a0c2672dbd22dc85d660e5baa7e1bef701beb88, but for
routing policy rule.
Yu Watanabe [Mon, 19 Aug 2024 18:56:33 +0000 (03:56 +0900)]
network/routing-policy-rule: skip requesting when rule is already requested
If it is already requested, the new request will be anyway silently refused by
link_queue_request_safe(), which returns 0 in such case. Let's return earlier.
There should be no functional change, just refactoring.
Yu Watanabe [Sat, 17 Aug 2024 04:33:35 +0000 (13:33 +0900)]
network/address-label: allow to configure IPv6 address label in networkd.conf
Closes #23159.
Yu Watanabe [Sat, 17 Aug 2024 04:04:03 +0000 (13:04 +0900)]
network/queue: introduce manager_queue_request_full()
Currently it is not used, but will be used later.
Yu Watanabe [Sat, 17 Aug 2024 04:02:06 +0000 (13:02 +0900)]
network/address-label: split out address_label_fill_message()
No functional change, just refactoring and preparation for later
commits.
Yu Watanabe [Sat, 17 Aug 2024 03:38:44 +0000 (12:38 +0900)]
network/address-label: several cleanups for conf parsers
- Check userdata, instead of data, though they point to the same
position.
- Support an empty string.
- Use UINT32_MAX, as the label is uint32_t.
Yu Watanabe [Sat, 17 Aug 2024 03:36:18 +0000 (12:36 +0900)]
network/address-label: introduce custom hash_ops
No functional change, just refactoring.
Yu Watanabe [Mon, 19 Aug 2024 18:52:47 +0000 (03:52 +0900)]
network/routing-policy-rule: add trailing period to the log message
Yu Watanabe [Mon, 19 Aug 2024 18:36:40 +0000 (03:36 +0900)]
network/routing-policy-rule: do not modify RountingPolicyRule objects managed by Manager or Network
They are stored in Manager.rules set or Network.rules_by_section hashmap.
For safety, let's not edit them even temporarily.
No functional change, just refactoring.
Lennart Poettering [Tue, 20 Aug 2024 08:52:20 +0000 (10:52 +0200)]
shared: invoke agents only when we have a controlling TTY
being connected to a TTY is not really enough to determine
interactivity in many cases. Let's also check if we have a controlling
TTY.
Inspired by #34016
Yu Watanabe [Tue, 20 Aug 2024 11:36:07 +0000 (20:36 +0900)]
Merge pull request #34044 from poettering/isatty-fixes
fixes around isatty() handling
Lennart Poettering [Tue, 20 Aug 2024 08:28:53 +0000 (10:28 +0200)]
man: fix ID_NET_LABEL_ONBOARD= documentation
We do not prefix the field with anything, since
8c053c83ae3c18342c4faaa0043d787884056614.
Luca Boccassi [Tue, 20 Aug 2024 10:14:03 +0000 (12:14 +0200)]
Merge pull request #34009 from yuwata/network-resolve-polkit
network,resolve: support interactive authentication
Luca Boccassi [Tue, 20 Aug 2024 09:59:30 +0000 (11:59 +0200)]
Merge pull request #34014 from yuwata/network-ip-masquerade
network: make IPMasquerade= imply global IP forwarding settings again
Luca Boccassi [Tue, 20 Aug 2024 09:49:02 +0000 (11:49 +0200)]
Merge pull request #34021 from yuwata/network-routing-policy-rule
network/routing-policy-rule: several cleanups
Ronan Pigott [Mon, 19 Aug 2024 20:18:10 +0000 (13:18 -0700)]
resolved: demote the global unicast scope
This will greatly reduce the number of cases where the global unicast
scope overlaps with link scopes configured as default-route, making it
feasible to use the global DNS setting in conjunction with per-link dns
servers configured by the network.
This change is preferred over demoting links to default-route=no where
the user prefers to use the network provided DNS servers, and I expect
it is non-disruptive in that it should not degrade the efficacy of any
existing configuration.
Lennart Poettering [Tue, 20 Aug 2024 08:33:52 +0000 (10:33 +0200)]
tree-wide: use isatty_safe() more
Lennart Poettering [Tue, 20 Aug 2024 08:32:14 +0000 (10:32 +0200)]
terminal-util: don't assume errno is correctly set when using isatty_safe()
let's instead generate ENOTTY on our own. This is more correct with out
coding style (since we generally do not propagate errors via errno), and
also addresses #34039 as side effect. (#34039 really needs to be fixed
in musl though, too, this is just a work-around as side-effect).
Fixes: #34039
Lennart Poettering [Tue, 20 Aug 2024 08:30:19 +0000 (10:30 +0200)]
terminal-util: fix isatty_safe() on hung-up TTYs
glibc returs EIO on ttys that are hung up. That's not really correct,
POSIX seems to disagree.
Work around this in our code, and turn this into a clean "1", since a
hung up tty doesn't stop being a tty just because it is hung up.
Background: https://github.com/systemd/systemd/pull/34039
Yu Watanabe [Tue, 20 Aug 2024 04:08:59 +0000 (13:08 +0900)]
test-network: make kernel send NA with router flag
If the router interface send NA without router flag, client interface will drop
SLAAC addresses. To make the router interface send NA with router flag,
IPv6 forwarding needs to be enabled.
===
client: NDISC: Received Neighbor Advertisement from fe80::1034:56ff:fe78:9a99: Router=no, Solicited=yes, Override=no
client: NDISC: Invoking callback for 'neighbor' event.
client: Removing NDisc route (configured): dst: 2002:da8:1:99::/64, src: n/a, gw: n/a, prefsrc: n/a, table: main(254), priority: 1024, proto: ra, scope: global, type: unicast, flags: n/a
client: Removing NDisc route (configured): dst: n/a, src: n/a, gw: fe80::1034:56ff:fe78:9a99, prefsrc: n/a, table: main(254), priority: 1024, proto: ra, scope: global, type: unicast, flags: n/a
client: Removing NDisc address (configured): 2002:da8:1:99:1034:56ff:fe78:9a00/64 (valid for 23h 59min 58s, preferred for 3h 59min 58s), flags: manage-temporary-address,no-prefixroute, scope: global
===
maia x. [Mon, 19 Aug 2024 19:47:21 +0000 (12:47 -0700)]
namespace: Fix extension release memory leak
In apply_one_mount(), in the MOUNT_EXTENSION_DIRECTORY case,
char **extension_release was used as a return pointer twice but only
cleaned up once in the end. Fix it by removing duplicate code that
was causing this issue.
Fixes issue introduced in
55ea4ef096543d2bceea9315868d5aca945d7a57.
Yu Watanabe [Mon, 19 Aug 2024 03:36:17 +0000 (12:36 +0900)]
network/routing-policy-rule: drop unused argument
Yu Watanabe [Sat, 17 Aug 2024 07:14:31 +0000 (16:14 +0900)]
network/routing-policy-rule: introduce ref and unref functions for RoutingPolicyRule
No functional change, just refactoring and preparation for later change.
Yu Watanabe [Sat, 17 Aug 2024 11:24:07 +0000 (20:24 +0900)]
network/routing-policy-rule: manage all flags
Currently, only FIB_RULE_INVERT flag can be configurable, but for
simplicity and future extension, let's manage all flags.
No functional change, just refactoring.
Yu Watanabe [Sat, 17 Aug 2024 11:13:12 +0000 (20:13 +0900)]
network/routing-policy-rule: use int32_t for suppress_prefixlen
The kernel parses FRA_SUPPRESS_PREFIXLEN as uint32_t, but internally
handled as signed integer and negative values as unset. Let's explicitly
specify the size of the variable.
No functional change, just refactoring.
Yu Watanabe [Sat, 17 Aug 2024 06:25:04 +0000 (15:25 +0900)]
network/routing-policy-rule: reorder elements of RoutingPolicyRule and add comments
No functional change, just refactoring.
Yu Watanabe [Sat, 17 Aug 2024 05:55:41 +0000 (14:55 +0900)]
network/routing-policy-rule: update hash and compare function for fib rule
Let's manage fib rules with the logic used by the kernel.
Should not change any behavior.
Daan De Meyer [Sun, 18 Aug 2024 22:13:47 +0000 (00:13 +0200)]
test-dhcp-server: Gracefully handle the network being down