+/* SPDX-License-Identifier: LGPL-2.1+ */
/***
This file is part of systemd.
"/etc/systemd/network",
"/run/systemd/network",
"/usr/lib/systemd/network",
-#ifdef HAVE_SPLIT_USR
+#if HAVE_SPLIT_USR
"/lib/systemd/network",
#endif
NULL};
goto fail;
}
- fprintf(f, "from=%s%s/%hhu to=%s%s/%hhu tos=%hhu fwmark=%"PRIu32"/%"PRIu32" table=%hhu", space ? " " : "", from_str,
- rule->from_prefixlen, space ? " " : "", to_str, rule->to_prefixlen, rule->tos, rule->fwmark, rule->fwmask, rule->table);
+ fprintf(f, "from=%s%s/%hhu to=%s%s/%hhu tos=%hhu fwmark=%"PRIu32"/%"PRIu32" table=%"PRIu32,
+ space ? " " : "", from_str, rule->from_prefixlen,
+ space ? " " : "", to_str, rule->to_prefixlen,
+ rule->tos,
+ rule->fwmark, rule->fwmask,
+ rule->table);
fputc('\n', f);
}
return r;
r = sd_netlink_call(m->rtnl, req, 0, &reply);
- if (r < 0)
+ if (r < 0) {
+ if (r == -EOPNOTSUPP) {
+ log_debug("FIB Rules are not supported by the kernel. Ignoring.");
+ return 0;
+ }
+
return r;
+ }
for (rule = reply; rule; rule = sd_netlink_message_next(rule)) {
int k;