diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 68bb916501c292d7eb00ab058ea415e9f3ad07e1..9c49c705643d498c5476fee8a0177d5d22c60402 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -4567,6 +4567,13 @@ networkAllocatePort(virNetworkObjPtr obj, return -1; } + if (!port->bandwidth) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("QOS must be defined for network '%s'"), + netdef->name); + return -1; + } + if (networkPlugBandwidth(obj, &port->mac, port->bandwidth, &port->class_id) < 0) return -1; break; @@ -4633,6 +4640,13 @@ networkAllocatePort(virNetworkObjPtr obj, } } + if (!port->bandwidth) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("QOS must be defined for network '%s'"), + netdef->name); + return -1; + } + if (networkPlugBandwidth(obj, &port->mac, port->bandwidth, &port->class_id) < 0) return -1; break;