network: refuse to set 0 for rx or tx queue

Man page says that the valid value is 1-4096.
master
Yu Watanabe 2 years ago
parent 0b5dc24953
commit f7d0ea5b6f
  1. 2
      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;
}

Loading…
Cancel
Save