network: add/update comments about required kernel configs

This commit is contained in:
Yu Watanabe
2025-02-17 05:13:06 +09:00
parent 034b69d8b8
commit 6698795eda
+5 -1
View 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");