#define VIR_FROM_THIS VIR_FROM_NETWORK
-#define networkReportError(code, ...) \
- virReportErrorHelper(VIR_FROM_NETWORK, code, __FILE__, \
- __FUNCTION__, __LINE__, __VA_ARGS__)
-
/* Main driver state */
struct network_driver {
virMutex lock;
prefix = virNetworkIpDefPrefix(ipdef);
if (prefix < 0) {
- networkReportError(VIR_ERR_INTERNAL_ERROR,
- _("bridge '%s' has an invalid prefix"),
- network->def->bridge);
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("bridge '%s' has an invalid prefix"),
+ network->def->bridge);
goto cleanup;
}
if (!(netaddr = virSocketAddrFormat(&ipdef->address)))
const char *forwardIf = virNetworkDefForwardIf(network->def, 0);
if (prefix < 0) {
- networkReportError(VIR_ERR_INTERNAL_ERROR,
- _("Invalid prefix or netmask for '%s'"),
- network->def->bridge);
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Invalid prefix or netmask for '%s'"),
+ network->def->bridge);
goto masqerr1;
}
prefix,
network->def->bridge,
forwardIf) < 0) {
- networkReportError(VIR_ERR_SYSTEM_ERROR,
- _("failed to add iptables rule to allow forwarding from '%s'"),
- network->def->bridge);
+ virReportError(VIR_ERR_SYSTEM_ERROR,
+ _("failed to add iptables rule to allow forwarding from '%s'"),
+ network->def->bridge);
goto masqerr1;
}
prefix,
network->def->bridge,
forwardIf) < 0) {
- networkReportError(VIR_ERR_SYSTEM_ERROR,
- _("failed to add iptables rule to allow forwarding to '%s'"),
- network->def->bridge);
+ virReportError(VIR_ERR_SYSTEM_ERROR,
+ _("failed to add iptables rule to allow forwarding to '%s'"),
+ network->def->bridge);
goto masqerr2;
}
prefix,
forwardIf,
NULL) < 0) {
- networkReportError(VIR_ERR_SYSTEM_ERROR,
- forwardIf ?
- _("failed to add iptables rule to enable masquerading to %s") :
- _("failed to add iptables rule to enable masquerading"),
- forwardIf);
+ virReportError(VIR_ERR_SYSTEM_ERROR,
+ forwardIf ?
+ _("failed to add iptables rule to enable masquerading to %s") :
+ _("failed to add iptables rule to enable masquerading"),
+ forwardIf);
goto masqerr3;
}
prefix,
forwardIf,
"udp") < 0) {
- networkReportError(VIR_ERR_SYSTEM_ERROR,
- forwardIf ?
- _("failed to add iptables rule to enable UDP masquerading to %s") :
- _("failed to add iptables rule to enable UDP masquerading"),
- forwardIf);
+ virReportError(VIR_ERR_SYSTEM_ERROR,
+ forwardIf ?
+ _("failed to add iptables rule to enable UDP masquerading to %s") :
+ _("failed to add iptables rule to enable UDP masquerading"),
+ forwardIf);
goto masqerr4;
}
prefix,
forwardIf,
"tcp") < 0) {
- networkReportError(VIR_ERR_SYSTEM_ERROR,
- forwardIf ?
- _("failed to add iptables rule to enable TCP masquerading to %s") :
- _("failed to add iptables rule to enable TCP masquerading"),
- forwardIf);
+ virReportError(VIR_ERR_SYSTEM_ERROR,
+ forwardIf ?
+ _("failed to add iptables rule to enable TCP masquerading to %s") :
+ _("failed to add iptables rule to enable TCP masquerading"),
+ forwardIf);
goto masqerr5;
}
const char *forwardIf = virNetworkDefForwardIf(network->def, 0);
if (prefix < 0) {
- networkReportError(VIR_ERR_INTERNAL_ERROR,
- _("Invalid prefix or netmask for '%s'"),
- network->def->bridge);
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Invalid prefix or netmask for '%s'"),
+ network->def->bridge);
goto routeerr1;
}
prefix,
network->def->bridge,
forwardIf) < 0) {
- networkReportError(VIR_ERR_SYSTEM_ERROR,
- _("failed to add iptables rule to allow routing from '%s'"),
- network->def->bridge);
+ virReportError(VIR_ERR_SYSTEM_ERROR,
+ _("failed to add iptables rule to allow routing from '%s'"),
+ network->def->bridge);
goto routeerr1;
}
prefix,
network->def->bridge,
forwardIf) < 0) {
- networkReportError(VIR_ERR_SYSTEM_ERROR,
- _("failed to add iptables rule to allow routing to '%s'"),
- network->def->bridge);
+ virReportError(VIR_ERR_SYSTEM_ERROR,
+ _("failed to add iptables rule to allow routing to '%s'"),
+ network->def->bridge);
goto routeerr2;
}
if (iptablesAddForwardRejectOut(driver->iptables, AF_INET6,
network->def->bridge) < 0) {
- networkReportError(VIR_ERR_SYSTEM_ERROR,
- _("failed to add ip6tables rule to block outbound traffic from '%s'"),
- network->def->bridge);
+ virReportError(VIR_ERR_SYSTEM_ERROR,
+ _("failed to add ip6tables rule to block outbound traffic from '%s'"),
+ network->def->bridge);
goto err1;
}
if (iptablesAddForwardRejectIn(driver->iptables, AF_INET6,
network->def->bridge) < 0) {
- networkReportError(VIR_ERR_SYSTEM_ERROR,
- _("failed to add ip6tables rule to block inbound traffic to '%s'"),
- network->def->bridge);
+ virReportError(VIR_ERR_SYSTEM_ERROR,
+ _("failed to add ip6tables rule to block inbound traffic to '%s'"),
+ network->def->bridge);
goto err2;
}
/* Allow traffic between guests on the same bridge */
if (iptablesAddForwardAllowCross(driver->iptables, AF_INET6,
network->def->bridge) < 0) {
- networkReportError(VIR_ERR_SYSTEM_ERROR,
- _("failed to add ip6tables rule to allow cross bridge traffic on '%s'"),
- network->def->bridge);
+ virReportError(VIR_ERR_SYSTEM_ERROR,
+ _("failed to add ip6tables rule to allow cross bridge traffic on '%s'"),
+ network->def->bridge);
goto err3;
}
/* allow DNS over IPv6 */
if (iptablesAddTcpInput(driver->iptables, AF_INET6,
network->def->bridge, 53) < 0) {
- networkReportError(VIR_ERR_SYSTEM_ERROR,
- _("failed to add ip6tables rule to allow DNS requests from '%s'"),
- network->def->bridge);
+ virReportError(VIR_ERR_SYSTEM_ERROR,
+ _("failed to add ip6tables rule to allow DNS requests from '%s'"),
+ network->def->bridge);
goto err4;
}
if (iptablesAddUdpInput(driver->iptables, AF_INET6,
network->def->bridge, 53) < 0) {
- networkReportError(VIR_ERR_SYSTEM_ERROR,
- _("failed to add ip6tables rule to allow DNS requests from '%s'"),
- network->def->bridge);
+ virReportError(VIR_ERR_SYSTEM_ERROR,
+ _("failed to add ip6tables rule to allow DNS requests from '%s'"),
+ network->def->bridge);
goto err5;
}
if (iptablesAddTcpInput(driver->iptables, AF_INET,
network->def->bridge, 67) < 0) {
- networkReportError(VIR_ERR_SYSTEM_ERROR,
- _("failed to add iptables rule to allow DHCP requests from '%s'"),
- network->def->bridge);
+ virReportError(VIR_ERR_SYSTEM_ERROR,
+ _("failed to add iptables rule to allow DHCP requests from '%s'"),
+ network->def->bridge);
goto err1;
}
if (iptablesAddUdpInput(driver->iptables, AF_INET,
network->def->bridge, 67) < 0) {
- networkReportError(VIR_ERR_SYSTEM_ERROR,
- _("failed to add iptables rule to allow DHCP requests from '%s'"),
- network->def->bridge);
+ virReportError(VIR_ERR_SYSTEM_ERROR,
+ _("failed to add iptables rule to allow DHCP requests from '%s'"),
+ network->def->bridge);
goto err2;
}
/* allow DNS requests through to dnsmasq */
if (iptablesAddTcpInput(driver->iptables, AF_INET,
network->def->bridge, 53) < 0) {
- networkReportError(VIR_ERR_SYSTEM_ERROR,
- _("failed to add iptables rule to allow DNS requests from '%s'"),
- network->def->bridge);
+ virReportError(VIR_ERR_SYSTEM_ERROR,
+ _("failed to add iptables rule to allow DNS requests from '%s'"),
+ network->def->bridge);
goto err3;
}
if (iptablesAddUdpInput(driver->iptables, AF_INET,
network->def->bridge, 53) < 0) {
- networkReportError(VIR_ERR_SYSTEM_ERROR,
- _("failed to add iptables rule to allow DNS requests from '%s'"),
- network->def->bridge);
+ virReportError(VIR_ERR_SYSTEM_ERROR,
+ _("failed to add iptables rule to allow DNS requests from '%s'"),
+ network->def->bridge);
goto err4;
}
if (ipv4def && ipv4def->tftproot &&
iptablesAddUdpInput(driver->iptables, AF_INET,
network->def->bridge, 69) < 0) {
- networkReportError(VIR_ERR_SYSTEM_ERROR,
- _("failed to add iptables rule to allow TFTP requests from '%s'"),
- network->def->bridge);
+ virReportError(VIR_ERR_SYSTEM_ERROR,
+ _("failed to add iptables rule to allow TFTP requests from '%s'"),
+ network->def->bridge);
goto err5;
}
if (iptablesAddForwardRejectOut(driver->iptables, AF_INET,
network->def->bridge) < 0) {
- networkReportError(VIR_ERR_SYSTEM_ERROR,
- _("failed to add iptables rule to block outbound traffic from '%s'"),
- network->def->bridge);
+ virReportError(VIR_ERR_SYSTEM_ERROR,
+ _("failed to add iptables rule to block outbound traffic from '%s'"),
+ network->def->bridge);
goto err6;
}
if (iptablesAddForwardRejectIn(driver->iptables, AF_INET,
network->def->bridge) < 0) {
- networkReportError(VIR_ERR_SYSTEM_ERROR,
- _("failed to add iptables rule to block inbound traffic to '%s'"),
- network->def->bridge);
+ virReportError(VIR_ERR_SYSTEM_ERROR,
+ _("failed to add iptables rule to block inbound traffic to '%s'"),
+ network->def->bridge);
goto err7;
}
/* Allow traffic between guests on the same bridge */
if (iptablesAddForwardAllowCross(driver->iptables, AF_INET,
network->def->bridge) < 0) {
- networkReportError(VIR_ERR_SYSTEM_ERROR,
- _("failed to add iptables rule to allow cross bridge traffic on '%s'"),
- network->def->bridge);
+ virReportError(VIR_ERR_SYSTEM_ERROR,
+ _("failed to add iptables rule to allow cross bridge traffic on '%s'"),
+ network->def->bridge);
goto err8;
}
if ((net_dest == addr_val) &&
(netmask.data.inet4.sin_addr.s_addr == mask_val)) {
- networkReportError(VIR_ERR_INTERNAL_ERROR,
- _("Network is already in use by interface %s"),
- iface);
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Network is already in use by interface %s"),
+ iface);
ret = -1;
goto out;
}
int prefix = virNetworkIpDefPrefix(ipdef);
if (prefix < 0) {
- networkReportError(VIR_ERR_INTERNAL_ERROR,
- _("bridge '%s' has an invalid netmask or IP address"),
- network->def->bridge);
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("bridge '%s' has an invalid netmask or IP address"),
+ network->def->bridge);
return -1;
}
goto err4;
if (virNetDevBandwidthSet(network->def->bridge, network->def->bandwidth) < 0) {
- networkReportError(VIR_ERR_INTERNAL_ERROR,
- _("cannot set bandwidth limits on %s"),
- network->def->bridge);
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("cannot set bandwidth limits on %s"),
+ network->def->bridge);
goto err5;
}
int ret = 0;
if (virNetworkObjIsActive(network)) {
- networkReportError(VIR_ERR_OPERATION_INVALID,
- "%s", _("network is already active"));
+ virReportError(VIR_ERR_OPERATION_INVALID,
+ "%s", _("network is already active"));
return -1;
}
network = virNetworkFindByUUID(&driver->networks, uuid);
networkDriverUnlock(driver);
if (!network) {
- networkReportError(VIR_ERR_NO_NETWORK,
- "%s", _("no network with matching uuid"));
+ virReportError(VIR_ERR_NO_NETWORK,
+ "%s", _("no network with matching uuid"));
goto cleanup;
}
network = virNetworkFindByName(&driver->networks, name);
networkDriverUnlock(driver);
if (!network) {
- networkReportError(VIR_ERR_NO_NETWORK,
- _("no network with matching name '%s'"), name);
+ virReportError(VIR_ERR_NO_NETWORK,
+ _("no network with matching name '%s'"), name);
goto cleanup;
}
obj = virNetworkFindByUUID(&driver->networks, net->uuid);
networkDriverUnlock(driver);
if (!obj) {
- networkReportError(VIR_ERR_NO_NETWORK, NULL);
+ virReportError(VIR_ERR_NO_NETWORK, NULL);
goto cleanup;
}
ret = virNetworkObjIsActive(obj);
obj = virNetworkFindByUUID(&driver->networks, net->uuid);
networkDriverUnlock(driver);
if (!obj) {
- networkReportError(VIR_ERR_NO_NETWORK, NULL);
+ virReportError(VIR_ERR_NO_NETWORK, NULL);
goto cleanup;
}
ret = obj->persistent;
if (VIR_SOCKET_ADDR_IS_FAMILY(&ipdef->address, AF_INET)) {
if (ipdef->nranges || ipdef->nhosts) {
if (ipv4def) {
- networkReportError(VIR_ERR_CONFIG_UNSUPPORTED,
- "%s", _("Multiple dhcp sections found. dhcp is supported only for a single IPv4 address on each network"));
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("Multiple dhcp sections found. "
+ "dhcp is supported only for a "
+ "single IPv4 address on each network"));
goto cleanup;
} else {
ipv4def = ipdef;
network = virNetworkFindByUUID(&driver->networks, net->uuid);
if (!network) {
- networkReportError(VIR_ERR_NO_NETWORK,
- "%s", _("no network with matching uuid"));
+ virReportError(VIR_ERR_NO_NETWORK,
+ "%s", _("no network with matching uuid"));
goto cleanup;
}
if (virNetworkObjIsActive(network)) {
- networkReportError(VIR_ERR_OPERATION_INVALID,
- "%s", _("network is still active"));
+ virReportError(VIR_ERR_OPERATION_INVALID,
+ "%s", _("network is still active"));
goto cleanup;
}
network = virNetworkFindByUUID(&driver->networks, net->uuid);
if (!network) {
- networkReportError(VIR_ERR_NO_NETWORK,
- "%s", _("no network with matching uuid"));
+ virReportError(VIR_ERR_NO_NETWORK,
+ "%s", _("no network with matching uuid"));
goto cleanup;
}
network = virNetworkFindByUUID(&driver->networks, net->uuid);
if (!network) {
- networkReportError(VIR_ERR_NO_NETWORK,
- "%s", _("no network with matching uuid"));
+ virReportError(VIR_ERR_NO_NETWORK,
+ "%s", _("no network with matching uuid"));
goto cleanup;
}
if (!virNetworkObjIsActive(network)) {
- networkReportError(VIR_ERR_OPERATION_INVALID,
- "%s", _("network is not active"));
+ virReportError(VIR_ERR_OPERATION_INVALID,
+ "%s", _("network is not active"));
goto cleanup;
}
networkDriverUnlock(driver);
if (!network) {
- networkReportError(VIR_ERR_NO_NETWORK,
- "%s", _("no network with matching uuid"));
+ virReportError(VIR_ERR_NO_NETWORK,
+ "%s", _("no network with matching uuid"));
goto cleanup;
}
networkDriverUnlock(driver);
if (!network) {
- networkReportError(VIR_ERR_NO_NETWORK,
- "%s", _("no network with matching id"));
+ virReportError(VIR_ERR_NO_NETWORK,
+ "%s", _("no network with matching id"));
goto cleanup;
}
if (!(network->def->bridge)) {
- networkReportError(VIR_ERR_INTERNAL_ERROR,
- _("network '%s' does not have a bridge name."),
- network->def->name);
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("network '%s' does not have a bridge name."),
+ network->def->name);
goto cleanup;
}
network = virNetworkFindByUUID(&driver->networks, net->uuid);
networkDriverUnlock(driver);
if (!network) {
- networkReportError(VIR_ERR_NO_NETWORK,
- "%s", _("no network with matching uuid"));
+ virReportError(VIR_ERR_NO_NETWORK,
+ "%s", _("no network with matching uuid"));
goto cleanup;
}
network = virNetworkFindByUUID(&driver->networks, net->uuid);
if (!network) {
- networkReportError(VIR_ERR_NO_NETWORK,
- "%s", _("no network with matching uuid"));
+ virReportError(VIR_ERR_NO_NETWORK,
+ "%s", _("no network with matching uuid"));
goto cleanup;
}
if (!network->persistent) {
- networkReportError(VIR_ERR_OPERATION_INVALID,
- "%s", _("cannot set autostart for transient network"));
+ virReportError(VIR_ERR_OPERATION_INVALID,
+ "%s", _("cannot set autostart for transient network"));
goto cleanup;
}
network = virNetworkFindByName(&driver->networks, iface->data.network.name);
networkDriverUnlock(driver);
if (!network) {
- networkReportError(VIR_ERR_NO_NETWORK,
- _("no network with matching name '%s'"),
- iface->data.network.name);
+ virReportError(VIR_ERR_NO_NETWORK,
+ _("no network with matching name '%s'"),
+ iface->data.network.name);
goto cleanup;
}
* any error if exclusive use is required but could not be acquired).
*/
if ((netdef->nForwardIfs <= 0) && (netdef->nForwardPfs <= 0)) {
- networkReportError(VIR_ERR_INTERNAL_ERROR,
- _("network '%s' uses a direct mode, but has no forward dev and no interface pool"),
- netdef->name);
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("network '%s' uses a direct mode, but "
+ "has no forward dev and no interface pool"),
+ netdef->name);
goto cleanup;
} else {
virNetworkForwardIfDefPtr dev = NULL;
if ((netdef->nForwardPfs > 0) && (netdef->nForwardIfs <= 0)) {
if ((virNetDevGetVirtualFunctions(netdef->forwardPfs->dev,
&vfname, &num_virt_fns)) < 0) {
- networkReportError(VIR_ERR_INTERNAL_ERROR,
- _("Could not get Virtual functions on %s"),
- netdef->forwardPfs->dev);
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("Could not get Virtual functions on %s"),
+ netdef->forwardPfs->dev);
goto cleanup;
}
if (num_virt_fns == 0) {
- networkReportError(VIR_ERR_INTERNAL_ERROR,
- _("No Vf's present on SRIOV PF %s"),
- netdef->forwardPfs->dev);
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("No Vf's present on SRIOV PF %s"),
+ netdef->forwardPfs->dev);
goto cleanup;
}
}
/* dev points at the physical device we want to use */
if (!dev) {
- networkReportError(VIR_ERR_INTERNAL_ERROR,
- _("network '%s' requires exclusive access to interfaces, but none are available"),
- netdef->name);
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("network '%s' requires exclusive access "
+ "to interfaces, but none are available"),
+ netdef->name);
goto cleanup;
}
iface->data.network.actual->data.direct.linkdev = strdup(dev->dev);
network = virNetworkFindByName(&driver->networks, iface->data.network.name);
networkDriverUnlock(driver);
if (!network) {
- networkReportError(VIR_ERR_NO_NETWORK,
- _("no network with matching name '%s'"),
- iface->data.network.name);
+ virReportError(VIR_ERR_NO_NETWORK,
+ _("no network with matching name '%s'"),
+ iface->data.network.name);
goto cleanup;
}
actualDev = virDomainNetGetActualDirectDev(iface);
if (!actualDev) {
- networkReportError(VIR_ERR_INTERNAL_ERROR,
- "%s", _("the interface uses a direct mode, but has no source dev"));
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ "%s", _("the interface uses a direct "
+ "mode, but has no source dev"));
goto cleanup;
}
netdef = network->def;
if (netdef->nForwardIfs == 0) {
- networkReportError(VIR_ERR_INTERNAL_ERROR,
- _("network '%s' uses a direct mode, but has no forward dev and no interface pool"),
- netdef->name);
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("network '%s' uses a direct mode, but "
+ "has no forward dev and no interface pool"),
+ netdef->name);
goto cleanup;
} else {
int ii;
}
/* dev points at the physical device we want to use */
if (!dev) {
- networkReportError(VIR_ERR_INTERNAL_ERROR,
- _("network '%s' doesn't have dev='%s' in use by domain"),
- netdef->name, actualDev);
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("network '%s' doesn't have dev='%s' in use by domain"),
+ netdef->name, actualDev);
goto cleanup;
}
iface->data.network.actual->data.direct.virtPortProfile &&
(iface->data.network.actual->data.direct.virtPortProfile->virtPortType
== VIR_NETDEV_VPORT_PROFILE_8021QBH)))) {
- networkReportError(VIR_ERR_INTERNAL_ERROR,
- _("network '%s' claims dev='%s' is already in use by a different domain"),
- netdef->name, actualDev);
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("network '%s' claims dev='%s' is already in use by a different domain"),
+ netdef->name, actualDev);
goto cleanup;
}
/* we are now assured of success, so mark the allocation */
network = virNetworkFindByName(&driver->networks, iface->data.network.name);
networkDriverUnlock(driver);
if (!network) {
- networkReportError(VIR_ERR_NO_NETWORK,
- _("no network with matching name '%s'"),
- iface->data.network.name);
+ virReportError(VIR_ERR_NO_NETWORK,
+ _("no network with matching name '%s'"),
+ iface->data.network.name);
goto cleanup;
}
actualDev = virDomainNetGetActualDirectDev(iface);
if (!actualDev) {
- networkReportError(VIR_ERR_INTERNAL_ERROR,
- "%s", _("the interface uses a direct mode, but has no source dev"));
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ "%s", _("the interface uses a direct "
+ "mode, but has no source dev"));
goto cleanup;
}
netdef = network->def;
if (netdef->nForwardIfs == 0) {
- networkReportError(VIR_ERR_INTERNAL_ERROR,
- _("network '%s' uses a direct mode, but has no forward dev and no interface pool"),
- netdef->name);
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("network '%s' uses a direct mode, but "
+ "has no forward dev and no interface pool"),
+ netdef->name);
goto cleanup;
} else {
int ii;
}
/* dev points at the physical device we've been using */
if (!dev) {
- networkReportError(VIR_ERR_INTERNAL_ERROR,
- _("network '%s' doesn't have dev='%s' in use by domain"),
- netdef->name, actualDev);
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("network '%s' doesn't have dev='%s' in use by domain"),
+ netdef->name, actualDev);
goto cleanup;
}
network = virNetworkFindByName(&driver->networks, netname);
networkDriverUnlock(driver);
if (!network) {
- networkReportError(VIR_ERR_NO_NETWORK,
- _("no network with matching name '%s'"),
- netname);
+ virReportError(VIR_ERR_NO_NETWORK,
+ _("no network with matching name '%s'"),
+ netname);
goto cleanup;
}
netdef = network->def;
/* if there's an ipv4def, get it's address */
ipdef = virNetworkDefGetIpByIndex(netdef, AF_INET, 0);
if (!ipdef) {
- networkReportError(VIR_ERR_INTERNAL_ERROR,
- _("network '%s' doesn't have an IPv4 address"),
- netdef->name);
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("network '%s' doesn't have an IPv4 address"),
+ netdef->name);
break;
}
addrptr = &ipdef->address;
dev_name = netdef->forwardIfs[0].dev;
if (!dev_name) {
- networkReportError(VIR_ERR_INTERNAL_ERROR,
- _("network '%s' has no associated interface or bridge"),
- netdef->name);
+ virReportError(VIR_ERR_INTERNAL_ERROR,
+ _("network '%s' has no associated interface or bridge"),
+ netdef->name);
}
break;
}