if (!(def->bridge && virNetDevExists(def->bridge) == 1))
virNetworkObjSetActive(obj, false);
- if (networkSetMacMap(driver, obj) < 0)
- return -1;
-
break;
case VIR_NETWORK_FORWARD_BRIDGE:
if (virNetworkObjIsActive(obj) && def->ips && (def->nips > 0)) {
pid_t dnsmasqPid;
+ if (networkSetMacMap(driver, obj) < 0)
+ return -1;
+
ignore_value(virPidFileReadIfAlive(driver->pidDir,
def->name,
&dnsmasqPid,
if (virNetDevBridgeCreate(def->bridge, &def->mac) < 0)
return -1;
- if (networkSetMacMap(driver, obj) < 0)
- goto error;
-
/* Set bridge options */
if (def->mtu && virNetDevSetMTU(def->bridge, def->mtu) < 0)
/* start dnsmasq if there are any IP addresses (v4 or v6) */
if (v4present || v6present) {
+ if (networkSetMacMap(driver, obj) < 0)
+ goto error;
+
if (networkStartDhcpDaemon(driver, obj) < 0)
goto error;