Yu Watanabe
d50cfa98aa
tree-wide: IFA_FLAGS is supported since kernel v3.14
...
Now our baseline on the kernel is v5.4.
Let's unconditionally use the IFA_FLAGS attribute, and drop the getter
and setter for the deprecated header element.
Continuation of 29c2d4e158 .
2025-04-15 03:41:16 +09:00
Yu Watanabe
6dbf2c1beb
sd-netlink,sd-device: drop old kernels (<4.2) support
...
NETLINK_LIST_MEMBERSHIPS is supported since kernel v4.2, specifically
https://github.com/torvalds/linux/commit/b42be38b2778eda2237fc759e55e3b698b05b315
Our baseline on the kernel is v5.4. Let's drop unnecessary conditions.
2025-04-15 03:40:40 +09:00
Yu Watanabe
d3d375a686
udev-builtin-net_id: drop old kernels (<4.20) support
...
Since kernel v4.20, specifically since
https://github.com/torvalds/linux/commit/9b8b2a323008aedd39a8debb861b825707f01420
IP-over-Infiniband driver also uses dev_port.
As our baseline on the kernel is v5.4. Let's remove the fallback code.
For more details about the fallback, see
https://github.com/systemd/systemd/pull/10082#issuecomment-421416461
2025-04-15 03:40:14 +09:00
Yu Watanabe
6d203bd830
test-condition: drop cgroup version check
...
After f74ca66e68 , we do not check the
cgroup version of the runtime environment, and unconditionally returns 0
for "v1", and 1 for "v2".
2025-04-14 17:22:46 +01:00
Yu Watanabe
cc983fc9dc
resolve: drop code for supporting old kernels (<3.2)
...
Now our baseline on the kernel is 5.4.
Note, the removed code triggered assert_return() in
sd_event_source_set_description().
2025-04-14 22:26:40 +09:00
Yu Watanabe
5e3887e6c1
loop-util: drop workaround for kernel older than v5.0
...
Now our baseline on the kernel is v5.4.
2025-04-14 21:57:53 +09:00
Yu Watanabe
cde55c44ed
core: hash_ops related cleanups ( #37114 )
2025-04-14 03:17:26 +09:00
Yu Watanabe
308a3872e9
shared/condition: remove cgroup hierarchy check ( #37101 )
2025-04-14 03:17:01 +09:00
Mike Yuan
a04da2db6b
oomd: it's safe to assume cgv2 now
2025-04-13 18:09:40 +02:00
Mike Yuan
f74ca66e68
shared/condition: remove cgroup hierarchy check
2025-04-13 18:09:04 +02:00
Mike Yuan
e9f0e96234
core/taint: decrease stage array size for "cgroupsv1" removal
...
Follow-up for 399791eaf0
2025-04-13 18:09:02 +02:00
Yu Watanabe
be1f90d97f
socket-proxy: fix use-after-free
...
Fixes a bug in 10e41cdddc .
Fixes CID#1609061.
2025-04-13 10:24:50 +01:00
Luca Boccassi
ba6c955f21
coredump: verify pidfd after parsing data in usermode helper
...
Ensure the pidfd is still valid before continuing
Follow-up for 313537da6f
2025-04-13 10:18:58 +01:00
Yu Watanabe
52278e0634
network/wiphy: use hash_ops with destructor for managing Wiphy objects
2025-04-13 10:15:02 +09:00
Yu Watanabe
4cf443e644
network/link: use hash_ops with destructor for managing Link objects
2025-04-13 10:15:02 +09:00
Yu Watanabe
a85f73fa55
network/network: use hash_ops with destructor for managing Network objects
2025-04-13 10:15:02 +09:00
Yu Watanabe
09ddaf2af3
hashmap: introduce ordered_hashmap_free_and_replace()
2025-04-13 10:15:02 +09:00
Yu Watanabe
919aeb666a
network/network: use hash_ops with destructor for managing stacked netdevs
2025-04-13 10:15:02 +09:00
Yu Watanabe
1b25b88f82
network/bridge-fdb,mdb: use hash_ops with destructor
2025-04-13 10:10:29 +09:00
Yu Watanabe
5c6e6f5ad1
network/dhcp-server: use hash_ops with destructor for static lease
2025-04-13 10:10:29 +09:00
Yu Watanabe
10d786458c
network/radv: use hash_ops with destructor for managing prefixes
2025-04-13 10:10:29 +09:00
Yu Watanabe
d3af116afd
network,udev: use hash_ops with destructor to manage SR-IOV configs
2025-04-13 10:09:53 +09:00
Yu Watanabe
32b5deb1b2
network/ndisc: replace set_free_free() with set_free()
...
They uses in_addr_prefix_hash_ops_free, hence set_free() is enough.
2025-04-13 10:09:45 +09:00
Yu Watanabe
6d1a69d0f0
network: use in6_addr_hash_ops_free in Network.ipv6_proxy_ndp_addresses
...
This also one adjustment to network_adjust_ipv6_proxy_ndp().
2025-04-13 10:09:45 +09:00
Yu Watanabe
25a9bd72ef
network: use dns_name_hash_ops_free in dnssec negative trust anchors
2025-04-13 10:09:45 +09:00
Yu Watanabe
fadc825c5b
test-networkd-conf: config_parse_ether_addrs() uses ether_addr_hash_ops_free
...
Hence, set_free() is enough to free the result.
2025-04-13 10:04:08 +09:00
Yu Watanabe
1cf4c2fc42
network-generator: use hash_ops with destructor for Network, NetDev, and Link
2025-04-13 10:03:40 +09:00
Yu Watanabe
26f8a0144a
wait-online: move manager_process_link() to link.c
...
Then, rename it to rtnl_process_link().
No functional change, just refactoring.
2025-04-13 10:03:40 +09:00
Yu Watanabe
9f66d61a41
wait-online: use hash_ops with destructor for managing Link
2025-04-13 10:03:40 +09:00
Yu Watanabe
4100e0f207
sysv-generator: introduce hash_ops for SysvStub
...
This also renames free_sysvstub() -> sysvstub_free(), to follow our
usual coding style.
2025-04-13 10:00:57 +09:00
Yu Watanabe
765ffa12ee
sysusers: use trivial_hash_ops_free for storing user/group name
2025-04-13 10:00:57 +09:00
Yu Watanabe
5f43554f90
sd-netlink: introduce custom hash_ops for GenericNetlinkFamily
2025-04-13 10:00:57 +09:00
Yu Watanabe
70669fa2fe
sd-device-enumerator: use custom hash_ops with destructor
2025-04-13 10:00:57 +09:00
Yu Watanabe
f92fac7e9b
sd-device: replace set_free_free() with set_free()
...
These uses string_hash_ops_free, hence not set_free() is enough.
2025-04-13 10:00:57 +09:00
Yu Watanabe
855800aaec
coredump: replace custom cleanup function with specific hash_ops with destructor
2025-04-13 10:00:57 +09:00
Yu Watanabe
f8b0277101
analyze: replace set_free_free() with set_free()
...
set_put_strdup() uses &string_hash_ops_free, hence set_free() also
frees stored contents.
2025-04-13 10:00:57 +09:00
Yu Watanabe
d6c8db650d
resolved-dns-trust-anchor: use hash_ops with destructor for managing DnsAnswer
2025-04-13 09:58:49 +09:00
Yu Watanabe
442ac1b1b0
resolved-dns-trust-anchor: use hash_ops with destructor for managing RRs
2025-04-13 09:58:49 +09:00
Yu Watanabe
f7880e58f2
resolved-dns-scope: use hash_ops with destructor for conflict_queue
2025-04-13 09:58:49 +09:00
Yu Watanabe
5c274555c3
resolve: use dns_name_hash_ops_free for dnssec negative trust anchor
2025-04-13 09:58:49 +09:00
Yu Watanabe
d9856d812b
journal-remote: introduce custom hash_ops with destructor for MHDDaemonWrapper
...
Then, we can move declaration of the type from journal-remote.c to
journal-remote-main.c, and drop several #if ... #endif.
2025-04-13 09:57:19 +09:00
Yu Watanabe
8eb4ce4118
sd-journal: use hash_ops with destructor that closes JournalFile
2025-04-13 09:57:19 +09:00
Yu Watanabe
c5ed193516
journal: use hash_ops with destructor that make JournalFile offline and close
2025-04-13 09:57:19 +09:00
Yu Watanabe
83d3aed907
journal: replace unnecessary use of set_free_free() with set_free()
...
These uses pcre2_code_hash_ops_free, hence set_free() is enough.
2025-04-13 09:57:19 +09:00
Yu Watanabe
d502816b3e
unit-file: use set_free() to free paths
...
As it uses path_hash_ops_free.
2025-04-13 09:49:40 +09:00
Yu Watanabe
5c6ea30209
core/unit: use string_hash_ops_free for Unit.aliases
2025-04-13 09:49:40 +09:00
Yu Watanabe
5793a39dd8
core,systemctl: unit_file_find_fragment() provides names with string_hash_ops_free
...
names are assigned with set_put_strdup(), hence string_hash_ops_free is
used and we can use set_free() rather than set_free_free().
2025-04-13 09:49:40 +09:00
Yu Watanabe
c4c4ea2fb6
core: replace unnecessary use of set_free_free() with set_free()
...
These variables are assigned with set_put_strv(), hence
string_hash_ops_free is used.
This also drops unnecessary call of set_ensure_allocated() with wrong
hash ops.
2025-04-13 09:49:39 +09:00
Yu Watanabe
f9ae1f5cf5
install: use hash_ops with destructor for InstallInfo
2025-04-13 09:49:39 +09:00
Yu Watanabe
8d190e990e
install: use path_hash_ops_free
2025-04-13 09:49:39 +09:00