]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: add/update comments about required kernel configs
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 16 Feb 2025 20:09:14 +0000 (05:09 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 16 Feb 2025 20:13:06 +0000 (05:13 +0900)
src/network/networkd-manager.c

index d2e81415c1516e3d73d42834ee376b252d39fa7a..c2625d548b20103093fc218fee2f18fc11ca073d 100644 (file)
@@ -277,6 +277,7 @@ static int manager_connect_genl(Manager *m) {
         if (r < 0)
                 return r;
 
+        /* If the kernel is built without CONFIG_WIRELESS, the belows will fail with -EOPNOTSUPP. */
         r = genl_add_match(m->genl, NULL, NL80211_GENL_NAME, NL80211_MULTICAST_GROUP_CONFIG, 0,
                            &manager_genl_process_nl80211_config, NULL, m, "network-genl_process_nl80211_config");
         if (r < 0 && r != -EOPNOTSUPP)
@@ -1049,12 +1050,14 @@ int manager_enumerate(Manager *m) {
         if (r < 0)
                 return log_error_errno(r, "Could not enumerate links: %m");
 
+        /* If the kernel is built without CONFIG_NET_SCHED, the below will fail with -EOPNOTSUPP. */
         r = manager_enumerate_qdisc(m);
         if (r == -EOPNOTSUPP)
                 log_debug_errno(r, "Could not enumerate QDiscs, ignoring: %m");
         else if (r < 0)
                 return log_error_errno(r, "Could not enumerate QDisc: %m");
 
+        /* If the kernel is built without CONFIG_NET_CLS, the below will fail with -EOPNOTSUPP. */
         r = manager_enumerate_tclass(m);
         if (r == -EOPNOTSUPP)
                 log_debug_errno(r, "Could not enumerate TClasses, ignoring: %m");
@@ -1077,13 +1080,14 @@ int manager_enumerate(Manager *m) {
         if (r < 0)
                 return log_error_errno(r, "Could not enumerate routes: %m");
 
-        /* If kernel is built with CONFIG_FIB_RULES=n, it returns -EOPNOTSUPP. */
+        /* If the kernel is built without CONFIG_FIB_RULES, the below will fail with -EOPNOTSUPP. */
         r = manager_enumerate_rules(m);
         if (r == -EOPNOTSUPP)
                 log_debug_errno(r, "Could not enumerate routing policy rules, ignoring: %m");
         else if (r < 0)
                 return log_error_errno(r, "Could not enumerate routing policy rules: %m");
 
+        /* If the kernel is built without CONFIG_WIRELESS, the belows will fail with -EOPNOTSUPP. */
         r = manager_enumerate_nl80211_wiphy(m);
         if (r == -EOPNOTSUPP)
                 log_debug_errno(r, "Could not enumerate wireless LAN phy, ignoring: %m");