summaryrefslogtreecommitdiffstats
path: root/src/network/networkd-network.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2021-01-08 16:05:41 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-01-08 16:05:45 +0100
commitf7d0ea5b6f9262f6988c4521e240600e881c455e (patch)
treea6dc5b926f5a3802552bf76ed93e3be0dd835b97 /src/network/networkd-network.c
parenttest-network: add tests for route advmss (diff)
downloadsystemd-f7d0ea5b6f9262f6988c4521e240600e881c455e.tar.xz
systemd-f7d0ea5b6f9262f6988c4521e240600e881c455e.zip
network: refuse to set 0 for rx or tx queue
Man page says that the valid value is 1-4096.
Diffstat (limited to '')
-rw-r--r--src/network/networkd-network.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
index 6f1afed091..f6e36f7080 100644
--- a/src/network/networkd-network.c
+++ b/src/network/networkd-network.c
@@ -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;
}