]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: assume nexthop is supported by the kernel
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 16 Feb 2025 19:54:50 +0000 (04:54 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 16 Feb 2025 19:54:59 +0000 (04:54 +0900)
It is supported since kernel v5.3 (65ee00a9409f751188a8cdc0988167858eb4a536),
but our base line is now v5.4.

README
src/network/networkd-manager.c

diff --git a/README b/README
index 02a3e390520b6357e6c3f967dec029907c305594..2f89fffe0b2be1459202d42bca6e68df6270c3a4 100644 (file)
--- a/README
+++ b/README
@@ -42,7 +42,8 @@ REQUIREMENTS:
                      ≥ 4.17 for cgroup-bpf socket address hooks and /sys/power/resume_offset
                      ≥ 4.20 for PSI (used by systemd-oomd)
                      ≥ 5.2 for cgroup freezer and new mount API
-                     ≥ 5.3 for bounded loops in BPF program and keyring namespacing
+                     ≥ 5.3 for bounded loops in BPF program, keyring namespacing,
+                           and nexthop support
                      ≥ 5.4 for pidfd and signed Verity images
 
         ⛔ Kernel versions below 5.4 ("minimum baseline") are not supported at all,
index 1592e258ecab4a8da1ad55eafd6ab275dd1b7921..d2e81415c1516e3d73d42834ee376b252d39fa7a 100644 (file)
@@ -1069,12 +1069,8 @@ int manager_enumerate(Manager *m) {
         if (r < 0)
                 return log_error_errno(r, "Could not enumerate neighbors: %m");
 
-        /* NextHop support is added in kernel v5.3 (65ee00a9409f751188a8cdc0988167858eb4a536),
-         * and older kernels return -EOPNOTSUPP, or -EINVAL if SELinux is enabled. */
         r = manager_enumerate_nexthop(m);
-        if (r == -EOPNOTSUPP || (r == -EINVAL && mac_selinux_enforcing()))
-                log_debug_errno(r, "Could not enumerate nexthops, ignoring: %m");
-        else if (r < 0)
+        if (r < 0)
                 return log_error_errno(r, "Could not enumerate nexthops: %m");
 
         r = manager_enumerate_routes(m);