]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: refuse to set 0 for rx or tx queue 18168/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 8 Jan 2021 15:05:41 +0000 (00:05 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 8 Jan 2021 15:05:45 +0000 (00:05 +0900)
Man page says that the valid value is 1-4096.

src/network/networkd-network.c

index 6f1afed091d2eb192b61b5b27b6b06e0f32a20d7..f6e36f7080bc71fba2edc00c3434e78db037ab6e 100644 (file)
@@ -1221,7 +1221,7 @@ int config_parse_rx_tx_queues(
                 log_syntax(unit, LOG_WARNING, filename, line, r, "Failed to parse %s=, ignoring assignment: %s.", lvalue, rvalue);
                 return 0;
         }
-        if (k > 4096) {
+        if (k == 0 || k > 4096) {
                 log_syntax(unit, LOG_WARNING, filename, line, 0, "Invalid %s=, ignoring assignment: %s.", lvalue, rvalue);
                 return 0;
         }