Commit Graph
47559 Commits
Author SHA1 Message Date
Yu Watanabe 54f9fba5e6 network/route-nexthop: split out netlink message handling for route nexthops
No functional change, just refactoring and preparation for later
commits.
2024-01-14 06:04:23 +09:00
Yu Watanabe b24db7052e varlink/network: OnlineState may not be set
Follow-up for c5c74d85d3.

Fixes #30918.
2024-01-14 04:57:41 +09:00
Yu Watanabe 4db8ccbb59 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.
2024-01-13 10:10:32 +09:00
Yu Watanabe 0db96961b4 network/route: split out route_section_verify_nexthops()
No effective functional change, just refactoring and preparation for
later commits.
2024-01-13 10:10:32 +09:00
Yu Watanabe b9f29e9f52 network/route: relocate route_type_is_reject() and friends
No functional change, preparation for later commits.
2024-01-13 10:10:32 +09:00
Yu Watanabe b82697eb20 Merge pull request #30895 from yuwata/network-drop-object-even-on-fail
network: remove Address object even when we failed to remove relevant address
2024-01-13 09:03:07 +09:00
Luca Boccassi 10bebf26f3 Merge pull request #30902 from YHNdnzj/run-accounting
run: small improvements for accounting data output
2024-01-12 23:43:57 +00:00
Luca Boccassi f60c964535 Merge pull request #30897 from yuwata/network-route-expiration
network: several cleanups for route expiration handling
2024-01-12 23:32:12 +00:00
Luca Boccassi c9eb59e710 Merge pull request #30896 from yuwata/network-route-conf-parser
network: minor cleanups for conf parsers
2024-01-12 23:27:39 +00:00
Lennart Poettering 91b34c7641 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.
2024-01-12 21:43:34 +01:00
Lennart Poettering 535252dc26 networkd: expose nsid via dbus 2024-01-12 21:43:34 +01:00
Lennart Poettering fa2bc6f1d7 socket-util: add netns_get_nsid() helper to show nsid of netns 2024-01-12 21:43:34 +01:00
Lennart Poettering 1078628096 sd-netlink: hook up nsid APIs 2024-01-12 18:52:26 +01:00
Lennart Poettering 414ae39821 Merge pull request #30911 from poettering/vmspawn-tweaks
vmspawn: various clean-ups
2024-01-12 18:32:40 +01:00
chenjiayi 204594ecf1 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.
2024-01-12 15:52:38 +00:00
Luca Boccassi ffcb8647ca Merge pull request #30904 from YHNdnzj/no-selinux-reload
core/execute: don't reload selinux before spawning executor
2024-01-12 15:51:54 +00:00
Lennart Poettering b71855b331 vmspawn: suppress unnecessary '-' 2024-01-12 16:04:05 +01:00
Lennart Poettering 8b18350503 vmspawn: use SD_EVENT_SIGNAL_PROCMASK flag where possible 2024-01-12 16:03:57 +01:00
Lennart Poettering 06d4fe57c9 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.
2024-01-12 16:03:19 +01:00
Lennart Poettering 1d748d7c99 vmspawn: fix empty lines before section titles in --help text
Always put an empty line before section titles (one was missing so far)
2024-01-12 16:03:12 +01:00
Lennart Poettering 1f459f3a45 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.
2024-01-12 16:03:04 +01:00
Yu Watanabe be89a76a46 network/ndisc: do not try to set too large value for ICMP ratelimting
Follow-up for 6197db53ba.

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.
2024-01-12 14:38:30 +00:00
Lennart Poettering f4220d8c05 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: a617fd9047
2024-01-12 14:37:17 +00:00
Daan De Meyer 50cc0ee647 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.
2024-01-12 14:37:00 +00:00
Mike Yuan 5447338b95 run: don't show IP/IO accounting data if 0 2024-01-12 17:35:21 +08:00
Mike Yuan 73090a38b0 core/execute: don't reload selinux before spawning executor
With the introduction of sd-executor, SELinux needs to be re-initialized
after execve() anyway.
2024-01-12 17:17:37 +08:00
Mike Yuan a399804225 selinux-util: reorder functions 2024-01-12 17:17:37 +08:00
Mike Yuan 43ead5e3d6 run: show accounting data of same type in the same line 2024-01-12 16:58:11 +08:00
Yu Watanabe ffad01c81e network/route-nexthop: always reset gateway address when _dhcp or friends is specified to Gateway=
Just for safety.
2024-01-12 16:03:37 +09:00
Yu Watanabe dd0385c1f2 network/dhcp4: use route_configure_handler_internal() at one more place 2024-01-12 09:46:09 +09:00
Yu Watanabe 2c0b49baab network/route: update expiration timer only when we know the route exists 2024-01-12 09:46:09 +09:00
Yu Watanabe 14436bf523 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().
2024-01-12 09:46:09 +09:00
Yu Watanabe f86575ca06 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.
2024-01-12 09:46:09 +09:00
Yu Watanabe a5a0a4eb56 network/route: use specified error message
Previously, specified error message was not used.
2024-01-12 09:46:09 +09:00
Yu Watanabe 4207f6c05d network/route-nexthop: make GatewayOnLink= support an empty string
And invalidate the route section if an invalid string is specified.
2024-01-12 09:44:03 +09:00
Yu Watanabe 4444c2baf5 network/route: move two more conf parsers to networkd-route-nexthop.[ch]
Let's manage nexthop (gateway) handling in networkd-route-nexthop.[ch].
2024-01-12 09:44:03 +09:00
Yu Watanabe 62c6f9f7ac network/nexthop: drop NextHop object even if we fail to remove the nexthop 2024-01-12 09:36:04 +09:00
Yu Watanabe 84c86ae194 network/neighbor: drop Neighbor object even if we fail to remove the neighbor 2024-01-12 09:36:04 +09:00
Yu Watanabe 56a995fe8e 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.
2024-01-12 09:36:04 +09:00
Yu Watanabe 85a6f300c1 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 4e6a35e2b2.
2024-01-12 09:36:00 +09:00
Lennart Poettering 64b74c86d0 homed: add helpers for checking reference status of homes
Just some refactoring to make things more readable.
2024-01-12 09:25:17 +09:00
Yu Watanabe 967cd1712c Merge pull request #30867 from dtardon/udev-conf-dropins
Allow dropins for udev.conf
2024-01-12 06:37:23 +09:00
Yu Watanabe fa552ea1b1 Merge pull request #30893 from yuwata/add-trailing-NUL
json,netlink: add trailing NUL byte when we read binary data
2024-01-12 06:36:46 +09:00
Lennart Poettering 28795e4dca Merge pull request #30777 from poettering/ssh-generator
ssh-generator which makes VMs and containers accessible to ssh via AF_UNIX and AF_VSOCK
2024-01-11 21:31:28 +01:00
Lennart Poettering 25f8d3856a Merge pull request #30884 from poettering/logind-background-light
logind: add "background-light" + "manager" session classes
2024-01-11 21:20:01 +01:00
David Tardon 09dd8e77fc 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.
2024-01-12 05:12:42 +09:00
David Tardon a1c7dc7d16 udev-util: drop unused function 2024-01-12 05:11:18 +09:00
David Tardon 07f5e35fe7 udev-util: use config. parser to parse udev.conf 2024-01-12 05:11:14 +09:00
David Tardon 343c8514c1 udevd: use config. parser to parse udev.conf
This adds support for the usual config. file hierarchy (including
dropins).

Fixes #30460.
2024-01-12 05:08:18 +09:00
Yu Watanabe 70c24d0d9f sd-netlink: add trailing NUL byte for safety in sd_netlink_message_read_data()
Then, drop sd_netlink_message_read_data_suffix0().
2024-01-12 04:48:26 +09:00