network: refuse to set 0 for rx or tx queue

Man page says that the valid value is 1-4096.
This commit is contained in:
Yu Watanabe 2021-01-09 00:05:41 +09:00
parent 0b5dc24953
commit f7d0ea5b6f
1 changed files with 1 additions and 1 deletions

View 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;
}