]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
4 months agocreds-util: drop unnecessary include 30963/head
Lennart Poettering [Mon, 15 Jan 2024 14:21:35 +0000 (15:21 +0100)] 
creds-util: drop unnecessary include

Follow-up for: e653a194e490fae7d166f40762c334006d592051

4 months agocreds-util: simplify offset calculation a bit
Lennart Poettering [Mon, 15 Jan 2024 16:33:59 +0000 (17:33 +0100)] 
creds-util: simplify offset calculation a bit

Don't recalculate the overall offset entirely each time we process
another header. Instead, if we already validated an earlier offset, just
reuse the result, it's readily available in 'p'.

No change in behaviour, just a bit of code simplification.

4 months agoMerge pull request #30953 from yuwata/network-nexthop-silently-removed-by-kernel
Luca Boccassi [Tue, 16 Jan 2024 12:39:46 +0000 (12:39 +0000)] 
Merge pull request #30953 from yuwata/network-nexthop-silently-removed-by-kernel

network/nexthop: forget nexthops silently removed by kernel

4 months agonetwork/route: introduce route_get_link() and use it in log_route_debug()
Yu Watanabe [Sat, 13 Jan 2024 06:39:06 +0000 (15:39 +0900)] 
network/route: introduce route_get_link() and use it in log_route_debug()

No functional change, just refactoring and preparation for later
commits.

4 months agoudev: even if a device is a zac device, scsi-$ID_SERIAL will be reserved for it ...
我超厉害 [Tue, 16 Jan 2024 05:57:07 +0000 (13:57 +0800)] 
udev: even if a device is a zac device, scsi-$ID_SERIAL will be reserved for it (#30459)

Co-authored-by: wangyuhang <wangyuhang27@huawei.com>
4 months agoMerge pull request #30851 from lnussel/kernel-install
Yu Watanabe [Tue, 16 Jan 2024 05:55:35 +0000 (14:55 +0900)] 
Merge pull request #30851 from lnussel/kernel-install

kernel-install fixes

4 months agotree-wide: Load entry-token and layout.conf from /usr/lib/kernel/ as well
Daan De Meyer [Mon, 15 Jan 2024 12:46:49 +0000 (13:46 +0100)] 
tree-wide: Load entry-token and layout.conf from /usr/lib/kernel/ as well

4 months agotest-network: add test case for removal of nexthop that is a member of a group nexthop 30953/head
Yu Watanabe [Mon, 15 Jan 2024 10:48:48 +0000 (19:48 +0900)] 
test-network: add test case for removal of nexthop that is a member of a group nexthop

4 months agonetwork/nexthop: drop dependent nexthops on removal
Yu Watanabe [Mon, 15 Jan 2024 04:14:46 +0000 (13:14 +0900)] 
network/nexthop: drop dependent nexthops on removal

If a nexthop is removed, dependent nexthops are silently removed by the
kernel. Hence, networkd may be confused that nexthops that depends on the
nexthop still exist, and may fail to configure other routes or so.

4 months agonetwork/nexthop: introduce a reverse map of nexthop group members
Yu Watanabe [Mon, 15 Jan 2024 03:39:19 +0000 (12:39 +0900)] 
network/nexthop: introduce a reverse map of nexthop group members

It is not used in this commit, but will be used later.
Preparation for later commits.

4 months agonetwork/nexthop: read netlink message in nexthop_update_group()
Yu Watanabe [Mon, 15 Jan 2024 03:35:47 +0000 (12:35 +0900)] 
network/nexthop: read netlink message in nexthop_update_group()

No functional change, preparation for later commits.

4 months agonetwork/nexthop: reorder elements in NextHop
Yu Watanabe [Mon, 15 Jan 2024 02:59:21 +0000 (11:59 +0900)] 
network/nexthop: reorder elements in NextHop

4 months agobus-socket: Clarify that inotify is supposed to watch all components
Daan De Meyer [Mon, 15 Jan 2024 16:16:10 +0000 (17:16 +0100)] 
bus-socket: Clarify that inotify is supposed to watch all components

The previous wording of the components could mean that we should only
watch directories, not the socket itself. Reword so that we clearly
mention that all components of the path are watched, including the
socket itself.

4 months agokernel-install: silence num kernels installed 30851/head
Ludwig Nussel [Tue, 9 Jan 2024 11:49:09 +0000 (12:49 +0100)] 
kernel-install: silence num kernels installed

4 months agokernel-install: fix context_copy
Ludwig Nussel [Tue, 9 Jan 2024 11:29:36 +0000 (12:29 +0100)] 
kernel-install: fix context_copy

Don't reopen or dup values that weren't set before. Fixes add-all.

4 months agostrv: introduce strv_copy_unless_empty()
Ludwig Nussel [Tue, 9 Jan 2024 16:31:01 +0000 (17:31 +0100)] 
strv: introduce strv_copy_unless_empty()

4 months agoMerge pull request #30934 from yuwata/network-introduce-route-nexthop
Luca Boccassi [Mon, 15 Jan 2024 14:41:58 +0000 (14:41 +0000)] 
Merge pull request #30934 from yuwata/network-introduce-route-nexthop

network/route: introduce RouteNextHop object

4 months agosystemctl-is-system-running: display "offline" with --image
Antonio Alvarez Feijoo [Mon, 15 Jan 2024 09:55:31 +0000 (10:55 +0100)] 
systemctl-is-system-running: display "offline" with --image

With the `--image` option, the `running_in_chroot` check is not enough. E.g.:

```
> build/systemctl --image /tmp/20240108-openSUSE.raw is-system-running
running
```

4 months agotest-network: add simple test case for DHCP relay on bridge interface
Yu Watanabe [Mon, 15 Jan 2024 05:19:03 +0000 (14:19 +0900)] 
test-network: add simple test case for DHCP relay on bridge interface

For issue #30763.

4 months agoresolve: on_transaction_stream_error() may free multiple transactions
Yu Watanabe [Sun, 14 Jan 2024 00:40:27 +0000 (09:40 +0900)] 
resolve: on_transaction_stream_error() may free multiple transactions

Fixes #30928.

4 months agoMerge pull request #30933 from YHNdnzj/sleep-trivial-cleanup
Luca Boccassi [Mon, 15 Jan 2024 10:15:12 +0000 (10:15 +0000)] 
Merge pull request #30933 from YHNdnzj/sleep-trivial-cleanup

Trivial cleanup for systemd-sleep unit/man page

4 months agoMerge pull request #30936 from yuwata/network-automatically-reconfigure-interface...
Luca Boccassi [Mon, 15 Jan 2024 10:09:30 +0000 (10:09 +0000)] 
Merge pull request #30936 from yuwata/network-automatically-reconfigure-interface-on-failure

network: automatically reconfigure interface on failure

4 months agotest-network: try to flip interface state frequently 30936/head
Yu Watanabe [Mon, 15 Jan 2024 06:17:57 +0000 (15:17 +0900)] 
test-network: try to flip interface state frequently

4 months agonetwork/link: automatically reconfigure interface on failure
Yu Watanabe [Mon, 15 Jan 2024 06:40:54 +0000 (15:40 +0900)] 
network/link: automatically reconfigure interface on failure

Closes #29246.

4 months agonetwork/link: shorten code a bit
Yu Watanabe [Mon, 15 Jan 2024 06:40:07 +0000 (15:40 +0900)] 
network/link: shorten code a bit

4 months agonetwork/route: do not read RTA_OIF twice 30934/head
Yu Watanabe [Sat, 13 Jan 2024 21:22:03 +0000 (06:22 +0900)] 
network/route: do not read RTA_OIF twice

It is also read in route_nexthops_read_netlink_message(), and already
stored in the Route object. Let's use it.

4 months agonetwork/route-nexthop: store ifindex of the assigned interface in Route.nexthop.ifindex
Yu Watanabe [Sat, 13 Jan 2024 02:18:53 +0000 (11:18 +0900)] 
network/route-nexthop: store ifindex of the assigned interface in Route.nexthop.ifindex

And use it if set on building netlink message.

4 months agonetwork/route: also use RouteNextHop for managing gateway
Yu Watanabe [Fri, 12 Jan 2024 06:23:17 +0000 (15:23 +0900)] 
network/route: also use RouteNextHop for managing gateway

No functional change, just refactoring.

4 months agonetwork/route-nexthop: introduce struct RouteNextHop and replace MultipathRoute with it
Yu Watanabe [Fri, 12 Jan 2024 04:58:23 +0000 (13:58 +0900)] 
network/route-nexthop: introduce struct RouteNextHop and replace MultipathRoute with it

It is mostly equivalent to MultipathRoute. So, no functional change,
just refactoring and preparation for later commits.

4 months agotest: create /run/sshd in TEST-74-AUX-UTILS
Luca Boccassi [Sat, 13 Jan 2024 12:12:25 +0000 (12:12 +0000)] 
test: create /run/sshd in TEST-74-AUX-UTILS

12264s [ 4819.948632] sshd[1365]: fatal: Missing privilege separation directory: /run/sshd
12264s [ 4819.952120] testsuite-74.sh[1362]: kex_exchange_identification: read: Connection reset by peer
12264s [ 4819.952120] testsuite-74.sh[1362]: Connection reset by /run/ssh-unix-local/socket port 0

https://autopkgtest.ubuntu.com/results/autopkgtest-jammy-upstream-systemd-ci-systemd-ci/jammy/amd64/s/systemd-upstream/20240113_093341_50fc7@/log.gz

We copy binaries manually so some setups are missing, create the directory
as needed

4 months agoman/systemd-sleep.conf: document the operation of s2h more thoroughly 30933/head
Mike Yuan [Sat, 6 Jan 2024 15:36:24 +0000 (23:36 +0800)] 
man/systemd-sleep.conf: document the operation of s2h more thoroughly

4 months agounits: update Description= for systemd-sleep units
Mike Yuan [Sun, 14 Jan 2024 18:58:52 +0000 (02:58 +0800)] 
units: update Description= for systemd-sleep units

4 months agobattery-util: raise log level for battery_is_discharging_and_low
Mike Yuan [Sat, 6 Jan 2024 14:45:43 +0000 (22:45 +0800)] 
battery-util: raise log level for battery_is_discharging_and_low

4 months agoMerge pull request #30932 from yuwata/network-route-split-out-more
Luca Boccassi [Sun, 14 Jan 2024 13:03:45 +0000 (13:03 +0000)] 
Merge pull request #30932 from yuwata/network-route-split-out-more

network/route: split out more functions to networkd-route-nexthop.[ch]

4 months agoFix gcc14 -Wcalloc-transposed-args warnings
Cristian Rodríguez [Sat, 13 Jan 2024 23:14:05 +0000 (20:14 -0300)] 
Fix gcc14 -Wcalloc-transposed-args warnings

all functions annotated with two parameter _alloc_ are calloc-like.
gcc14 enforces this and warns if arguments are backwards.

4 months agoMerge pull request #30927 from YHNdnzj/logind-action-job
Luca Boccassi [Sun, 14 Jan 2024 12:56:42 +0000 (12:56 +0000)] 
Merge pull request #30927 from YHNdnzj/logind-action-job

logind-dbus: refuse multiple jobs in method_do_shutdown_or_sleep too

4 months agologind-dbus: refuse multiple jobs in method_do_shutdown_or_sleep too 30927/head
Mike Yuan [Sat, 13 Jan 2024 21:14:42 +0000 (05:14 +0800)] 
logind-dbus: refuse multiple jobs in method_do_shutdown_or_sleep too

Fixes #30917

4 months agologind-dbus: minor modernization
Mike Yuan [Sat, 13 Jan 2024 21:14:25 +0000 (05:14 +0800)] 
logind-dbus: minor modernization

4 months agonetwork/route-nexthop: make multipath_route_get_link() take fallback link 30932/head
Yu Watanabe [Sat, 13 Jan 2024 03:05:32 +0000 (12:05 +0900)] 
network/route-nexthop: make multipath_route_get_link() take fallback link

No functional change, just refactoring.

4 months agonetwork/route-nexthop: do not update MultipathRoute object
Yu Watanabe [Fri, 12 Jan 2024 04:22:05 +0000 (13:22 +0900)] 
network/route-nexthop: do not update MultipathRoute object

A MultipathRoute object is always owned by a Network object, and the
interface matching with its name specified in a MultipathRoute= setting
may be removed, and re-added later with a different ifindex.

4 months agonetwork/route-nexthop: split out route_nexthops_is_ready_to_configure()
Yu Watanabe [Fri, 12 Jan 2024 02:59:09 +0000 (11:59 +0900)] 
network/route-nexthop: split out route_nexthops_is_ready_to_configure()

No effective functionality changed, just refactoring and preparation for
later commits.

4 months agonetwork/route-nexthop: split out route_nexthops_to_string()
Yu Watanabe [Fri, 12 Jan 2024 02:07:46 +0000 (11:07 +0900)] 
network/route-nexthop: split out route_nexthops_to_string()

And reorder elements shown in the debugging log.
No effective functionality changed, just refactoring.

4 months agonetwork/route-nexthop: split out netlink message handling for route nexthops
Yu Watanabe [Tue, 9 Jan 2024 06:04:04 +0000 (15:04 +0900)] 
network/route-nexthop: split out netlink message handling for route nexthops

No functional change, just refactoring and preparation for later
commits.

4 months agovarlink/network: OnlineState may not be set
Yu Watanabe [Sat, 13 Jan 2024 11:06:59 +0000 (20:06 +0900)] 
varlink/network: OnlineState may not be set

Follow-up for c5c74d85d302d95d2b0f2b938c4f178e428e19a3.

Fixes #30918.

4 months agoMerge pull request #30916 from yuwata/network-route-section-verify
Yu Watanabe [Sat, 13 Jan 2024 19:57:05 +0000 (04:57 +0900)] 
Merge pull request #30916 from yuwata/network-route-section-verify

network: several cleanups for verifying [Route] section

4 months agowireguard: verify routes configured in .netdev file 30916/head
Yu Watanabe [Tue, 9 Jan 2024 02:45:37 +0000 (11:45 +0900)] 
wireguard: verify routes configured in .netdev file

Then, scope and friends are correctly adjusted, and the behavior should
be matched when the same route is configured in .network file.

4 months agonetwork/route: split out route_section_verify_nexthops()
Yu Watanabe [Sat, 13 Jan 2024 01:06:21 +0000 (10:06 +0900)] 
network/route: split out route_section_verify_nexthops()

No effective functional change, just refactoring and preparation for
later commits.

4 months agonetwork/route: relocate route_type_is_reject() and friends
Yu Watanabe [Sat, 13 Jan 2024 01:05:29 +0000 (10:05 +0900)] 
network/route: relocate route_type_is_reject() and friends

No functional change, preparation for later commits.

4 months agoMerge pull request #30895 from yuwata/network-drop-object-even-on-fail
Yu Watanabe [Sat, 13 Jan 2024 00:03:07 +0000 (09:03 +0900)] 
Merge pull request #30895 from yuwata/network-drop-object-even-on-fail

network: remove Address object even when we failed to remove relevant address

4 months agoMerge pull request #30902 from YHNdnzj/run-accounting
Luca Boccassi [Fri, 12 Jan 2024 23:43:57 +0000 (23:43 +0000)] 
Merge pull request #30902 from YHNdnzj/run-accounting

run: small improvements for accounting data output

4 months agoMerge pull request #30897 from yuwata/network-route-expiration
Luca Boccassi [Fri, 12 Jan 2024 23:32:12 +0000 (23:32 +0000)] 
Merge pull request #30897 from yuwata/network-route-expiration

network: several cleanups for route expiration handling

4 months agoMerge pull request #30896 from yuwata/network-route-conf-parser
Luca Boccassi [Fri, 12 Jan 2024 23:27:39 +0000 (23:27 +0000)] 
Merge pull request #30896 from yuwata/network-route-conf-parser

network: minor cleanups for conf parsers

4 months agomodprobe: set 'ifb numifbs=0' to avoid autocreating ifb0
Luca Boccassi [Fri, 12 Jan 2024 21:44:51 +0000 (21:44 +0000)] 
modprobe: set 'ifb numifbs=0' to avoid autocreating ifb0

Fixes https://github.com/systemd/systemd/issues/30913

4 months agotest: skip TEST-43-PRIVATEUSER-UNPRIV if unprivileged userns is restricted
Nick Rosbrook [Fri, 12 Jan 2024 19:02:17 +0000 (14:02 -0500)] 
test: skip TEST-43-PRIVATEUSER-UNPRIV if unprivileged userns is restricted

With newer versions of AppArmor, unprivileged user namespace creation
may be restricted by default, in which case user manager instances will
not be able to apply PrivateUsers=yes (or the settings which require it).

This can be tested with the kernel.apparmor_restrict_unprivileged_userns
sysctl.

4 months agoMerge pull request #30908 from poettering/nsid
Yu Watanabe [Fri, 12 Jan 2024 21:54:32 +0000 (06:54 +0900)] 
Merge pull request #30908 from poettering/nsid

networkd: expose netns "nsid" together with inode id

4 months agonetwork: fix 6rd tunnel link section name
Frantisek Sumsal [Fri, 12 Jan 2024 18:43:28 +0000 (19:43 +0100)] 
network: fix 6rd tunnel link section name

Spotted randomly when going through CI logs:

systemd-udevd[658]: /usr/lib/systemd/network/80-6rd-tunnel.link:21: Unknown section 'Network'. Ignoring.

Follow-up for 658169e6d30.

4 months agonetworkd: expose the nsid in the GetNamespaceId() varlink call 30908/head
Lennart Poettering [Fri, 12 Jan 2024 10:47:45 +0000 (11:47 +0100)] 
networkd: expose the nsid in the GetNamespaceId() varlink call

Let's return both ids in the GetNamespaceID(), since they are pretty
much the same concept.

4 months agonetworkd: expose nsid via dbus
Lennart Poettering [Fri, 12 Jan 2024 10:49:12 +0000 (11:49 +0100)] 
networkd: expose nsid via dbus

4 months agosocket-util: add netns_get_nsid() helper to show nsid of netns
Lennart Poettering [Fri, 12 Jan 2024 10:49:35 +0000 (11:49 +0100)] 
socket-util: add netns_get_nsid() helper to show nsid of netns

4 months agosd-netlink: hook up nsid APIs
Lennart Poettering [Fri, 12 Jan 2024 10:36:49 +0000 (11:36 +0100)] 
sd-netlink: hook up nsid APIs

4 months agoMerge pull request #30911 from poettering/vmspawn-tweaks
Lennart Poettering [Fri, 12 Jan 2024 17:32:40 +0000 (18:32 +0100)] 
Merge pull request #30911 from poettering/vmspawn-tweaks

vmspawn: various clean-ups

4 months agoudev: distinguish host-managed zoned block in scsi_id
chenjiayi [Mon, 8 Jan 2024 11:45:18 +0000 (19:45 +0800)] 
udev: distinguish host-managed zoned block in scsi_id

According to SPC4, the value of 0x14 is reserved to distinguish
host managed zoned block, e.g., some SMR (Shingled Magnetic Recording)
disks.

Other utilities such as sg3_utils can successfully recognize such
kind of disks. This patch implements the same ability.

4 months agoMerge pull request #30904 from YHNdnzj/no-selinux-reload
Luca Boccassi [Fri, 12 Jan 2024 15:51:54 +0000 (15:51 +0000)] 
Merge pull request #30904 from YHNdnzj/no-selinux-reload

core/execute: don't reload selinux before spawning executor

4 months agomkosi: Build a directory image by default
Daan De Meyer [Thu, 7 Dec 2023 18:52:41 +0000 (19:52 +0100)] 
mkosi: Build a directory image by default

Both building and booting a directory image is much faster than
building or booting a disk image so let's default to a directory
image.

In CI, we stick to a disk image to make sure that keeps working as
well.

The only extra dependency this introduces is virtiofsd which is
packaged in all distributions except Debian stable. For users
hacking on systemd on Debian stable, a disk image can be built by
writing the following to mkosi.local.conf:

```
[Output]
Format=disk
```

4 months agovmspawn: suppress unnecessary '-' 30911/head
Lennart Poettering [Fri, 12 Jan 2024 15:02:29 +0000 (16:02 +0100)] 
vmspawn: suppress unnecessary '-'

4 months agovmspawn: use SD_EVENT_SIGNAL_PROCMASK flag where possible
Lennart Poettering [Fri, 12 Jan 2024 14:57:13 +0000 (15:57 +0100)] 
vmspawn: use SD_EVENT_SIGNAL_PROCMASK flag where possible

4 months agovmspawn: use our generic vsock CID parser, instead of a howngrown one
Lennart Poettering [Fri, 12 Jan 2024 14:55:05 +0000 (15:55 +0100)] 
vmspawn: use our generic vsock CID parser, instead of a howngrown one

Let's also use 'unsigned' as type for the CID everywhere, and
VMADDR_CID_ANY as marker for "invalid CID", as that's what the vsock
APIs natively do.

4 months agovmspawn: fix empty lines before section titles in --help text
Lennart Poettering [Fri, 12 Jan 2024 14:37:43 +0000 (15:37 +0100)] 
vmspawn: fix empty lines before section titles in --help text

Always put an empty line before section titles (one was missing so far)

4 months agovmspawn: make sure are fine with ovmf metadata extensions
Lennart Poettering [Fri, 12 Jan 2024 14:37:15 +0000 (15:37 +0100)] 
vmspawn: make sure are fine with ovmf metadata extensions

The JSON ovmf data on Fedora at least has more fields than we expect,
ignore it.

4 months agonetwork/ndisc: do not try to set too large value for ICMP ratelimting
Yu Watanabe [Fri, 12 Jan 2024 01:00:31 +0000 (10:00 +0900)] 
network/ndisc: do not try to set too large value for ICMP ratelimting

Follow-up for 6197db53ba3c61de2268eb723a7a9cd4b3f5f87c.

When we set too large value, the kernel just refuse it. So, this does
not change the net behavior.

Prompted by https://github.com/systemd/systemd/pull/30490#discussion_r1449477125.

4 months agojson: downgrade extension log message to LOG_DEBUG
Lennart Poettering [Fri, 12 Jan 2024 11:03:00 +0000 (12:03 +0100)] 
json: downgrade extension log message to LOG_DEBUG

This is not supposed to be something we should complain about loudly
after all.

Follow-up for: a617fd904789cd3a05cf4cb2f54649e2a1f73d33

4 months agoAdd --root= support for list and prepare add-all for --root= support
Daan De Meyer [Fri, 12 Jan 2024 08:55:40 +0000 (09:55 +0100)] 
Add --root= support for list and prepare add-all for --root= support

Let's make sure these follow the rest of kernel-install and always
operate on the given root directory, even if the verb itself can't
support --root= just yet.

4 months agotest: use systemd-id128 from the build dir
Frantisek Sumsal [Fri, 12 Jan 2024 09:27:43 +0000 (10:27 +0100)] 
test: use systemd-id128 from the build dir

As distro sd-id128 might not have all the options we need.

Follow-up for: 378712c
Replaces: #30901

4 months agoman: fix typo AV_VSOCK → AF_VSOCK
Lennart Poettering [Fri, 12 Jan 2024 09:03:55 +0000 (10:03 +0100)] 
man: fix typo AV_VSOCK → AF_VSOCK

A reported by Arian van Putten:

https://github.com/systemd/systemd/pull/30777#pullrequestreview-1816817988

4 months agorun: don't show IP/IO accounting data if 0 30902/head
Mike Yuan [Fri, 12 Jan 2024 09:35:21 +0000 (17:35 +0800)] 
run: don't show IP/IO accounting data if 0

4 months agocore/execute: don't reload selinux before spawning executor 30904/head
Mike Yuan [Fri, 12 Jan 2024 07:13:29 +0000 (15:13 +0800)] 
core/execute: don't reload selinux before spawning executor

With the introduction of sd-executor, SELinux needs to be re-initialized
after execve() anyway.

4 months agoselinux-util: reorder functions
Mike Yuan [Fri, 12 Jan 2024 09:16:44 +0000 (17:16 +0800)] 
selinux-util: reorder functions

4 months agorun: show accounting data of same type in the same line
Mike Yuan [Fri, 12 Jan 2024 08:57:13 +0000 (16:57 +0800)] 
run: show accounting data of same type in the same line

4 months agonetwork/route-nexthop: always reset gateway address when _dhcp or friends is specifie... 30896/head
Yu Watanabe [Fri, 12 Jan 2024 06:29:11 +0000 (15:29 +0900)] 
network/route-nexthop: always reset gateway address when _dhcp or friends is specified to Gateway=

Just for safety.

4 months agonetwork/dhcp4: use route_configure_handler_internal() at one more place 30897/head
Yu Watanabe [Tue, 9 Jan 2024 07:22:42 +0000 (16:22 +0900)] 
network/dhcp4: use route_configure_handler_internal() at one more place

4 months agonetwork/route: update expiration timer only when we know the route exists
Yu Watanabe [Tue, 9 Jan 2024 07:20:39 +0000 (16:20 +0900)] 
network/route: update expiration timer only when we know the route exists

4 months agonetwork/route: save if the route expiration is managed by the kernel
Yu Watanabe [Tue, 9 Jan 2024 04:44:15 +0000 (13:44 +0900)] 
network/route: save if the route expiration is managed by the kernel

Otherwise, our own expiration timer will be setup on updating a route.
See comment in link_request_route().

4 months agonetwork/route: unconditionally call route_setup_timer() for managed routes
Yu Watanabe [Tue, 9 Jan 2024 04:36:22 +0000 (13:36 +0900)] 
network/route: unconditionally call route_setup_timer() for managed routes

For foreign routes, we do not set lifetime, as it is foreign.
So, this should not change any behavior. Preparation for later commits.

4 months agonetwork/route: use specified error message
Yu Watanabe [Tue, 9 Jan 2024 04:10:43 +0000 (13:10 +0900)] 
network/route: use specified error message

Previously, specified error message was not used.

4 months agonetwork/route-nexthop: make GatewayOnLink= support an empty string
Yu Watanabe [Tue, 9 Jan 2024 03:20:41 +0000 (12:20 +0900)] 
network/route-nexthop: make GatewayOnLink= support an empty string

And invalidate the route section if an invalid string is specified.

4 months agonetwork/route: move two more conf parsers to networkd-route-nexthop.[ch]
Yu Watanabe [Tue, 9 Jan 2024 02:23:42 +0000 (11:23 +0900)] 
network/route: move two more conf parsers to networkd-route-nexthop.[ch]

Let's manage nexthop (gateway) handling in networkd-route-nexthop.[ch].

4 months agonetwork/nexthop: drop NextHop object even if we fail to remove the nexthop 30895/head
Yu Watanabe [Tue, 2 Jan 2024 19:41:58 +0000 (04:41 +0900)] 
network/nexthop: drop NextHop object even if we fail to remove the nexthop

4 months agonetwork/neighbor: drop Neighbor object even if we fail to remove the neighbor
Yu Watanabe [Tue, 2 Jan 2024 19:41:50 +0000 (04:41 +0900)] 
network/neighbor: drop Neighbor object even if we fail to remove the neighbor

4 months agonetwork/address: forget address even if we could not remove it
Yu Watanabe [Tue, 2 Jan 2024 19:41:42 +0000 (04:41 +0900)] 
network/address: forget address even if we could not remove it

If we could not remove an address, then previously the corresponding
Address object was never removed, as it was freed only when we receive
remove notification from the kernel. So, we might confused that the
address still exists and being removed, and might block reconfiguring
the address.

With this change, even if we fail to remove an address, the
corresponding Address object will be freed.

4 months agonetwork/queue: introduce RemoveRequest and relevant functions
Yu Watanabe [Tue, 2 Jan 2024 19:41:34 +0000 (04:41 +0900)] 
network/queue: introduce RemoveRequest and relevant functions

This is similar to Request, but will be used on removing configuration
(e.g. address, route, and so on).

By using another queue for removing configuration, then we can avoid to
fill the reply callback buffer in sd-netlink by remove message calls.

Follow-up for 4e6a35e2b2fad0f167a71b63525f4210bc858bc6.

4 months agohomed: add helpers for checking reference status of homes
Lennart Poettering [Fri, 13 May 2022 22:04:08 +0000 (00:04 +0200)] 
homed: add helpers for checking reference status of homes

Just some refactoring to make things more readable.

4 months agoupdate TODO
Lennart Poettering [Thu, 11 Jan 2024 21:44:13 +0000 (22:44 +0100)] 
update TODO

4 months agoMerge pull request #30867 from dtardon/udev-conf-dropins
Yu Watanabe [Thu, 11 Jan 2024 21:37:23 +0000 (06:37 +0900)] 
Merge pull request #30867 from dtardon/udev-conf-dropins

Allow dropins for udev.conf

4 months agoMerge pull request #30893 from yuwata/add-trailing-NUL
Yu Watanabe [Thu, 11 Jan 2024 21:36:46 +0000 (06:36 +0900)] 
Merge pull request #30893 from yuwata/add-trailing-NUL

json,netlink: add trailing NUL byte when we read binary data

4 months agoMerge pull request #30777 from poettering/ssh-generator
Lennart Poettering [Thu, 11 Jan 2024 20:31:28 +0000 (21:31 +0100)] 
Merge pull request #30777 from poettering/ssh-generator

ssh-generator which makes VMs and containers accessible to ssh via AF_UNIX and AF_VSOCK

4 months agoMerge pull request #30884 from poettering/logind-background-light
Lennart Poettering [Thu, 11 Jan 2024 20:20:01 +0000 (21:20 +0100)] 
Merge pull request #30884 from poettering/logind-background-light

logind: add "background-light" + "manager" session classes

4 months agotest: use dropin dir 30867/head
David Tardon [Fri, 5 Jan 2024 15:10:50 +0000 (16:10 +0100)] 
test: use dropin dir

4 months agoman: update udev.conf man page
David Tardon [Wed, 10 Jan 2024 14:54:28 +0000 (15:54 +0100)] 
man: update udev.conf man page

4 months agoudev: factor out config parser call into function
David Tardon [Fri, 5 Jan 2024 15:11:24 +0000 (16:11 +0100)] 
udev: factor out config parser call into function

... which is then called from both places. This makes sure that the
configuration is parsed by udevd and other tools in exactly the same
way.

4 months agoudev-util: drop unused function
David Tardon [Fri, 5 Jan 2024 14:48:31 +0000 (15:48 +0100)] 
udev-util: drop unused function