mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
network: eliminate unnecessary labels
Signed-off-by: Laine Stump <laine@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
5cd1b25bd2
commit
8d591eb167
@ -1842,7 +1842,6 @@ networkRadvdConfContents(virNetworkObjPtr obj,
|
|||||||
{
|
{
|
||||||
virNetworkDefPtr def = virNetworkObjGetDef(obj);
|
virNetworkDefPtr def = virNetworkObjGetDef(obj);
|
||||||
g_auto(virBuffer) configbuf = VIR_BUFFER_INITIALIZER;
|
g_auto(virBuffer) configbuf = VIR_BUFFER_INITIALIZER;
|
||||||
int ret = -1;
|
|
||||||
size_t i;
|
size_t i;
|
||||||
virNetworkIPDefPtr ipdef;
|
virNetworkIPDefPtr ipdef;
|
||||||
bool v6present = false, dhcp6 = false;
|
bool v6present = false, dhcp6 = false;
|
||||||
@ -1859,10 +1858,8 @@ networkRadvdConfContents(virNetworkObjPtr obj,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* If there are no IPv6 addresses, then we are done */
|
/* If there are no IPv6 addresses, then we are done */
|
||||||
if (!v6present) {
|
if (!v6present)
|
||||||
ret = 0;
|
return 0;
|
||||||
goto cleanup;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* create radvd config file appropriate for this network;
|
/* create radvd config file appropriate for this network;
|
||||||
* IgnoreIfMissing allows radvd to start even when the bridge is down
|
* IgnoreIfMissing allows radvd to start even when the bridge is down
|
||||||
@ -1887,10 +1884,11 @@ networkRadvdConfContents(virNetworkObjPtr obj,
|
|||||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
_("bridge '%s' has an invalid prefix"),
|
_("bridge '%s' has an invalid prefix"),
|
||||||
def->bridge);
|
def->bridge);
|
||||||
goto cleanup;
|
return -1;
|
||||||
}
|
}
|
||||||
if (!(netaddr = virSocketAddrFormat(&ipdef->address)))
|
if (!(netaddr = virSocketAddrFormat(&ipdef->address)))
|
||||||
goto cleanup;
|
return -1;
|
||||||
|
|
||||||
virBufferAsprintf(&configbuf,
|
virBufferAsprintf(&configbuf,
|
||||||
" prefix %s/%d\n"
|
" prefix %s/%d\n"
|
||||||
" {\n%s };\n",
|
" {\n%s };\n",
|
||||||
@ -1903,9 +1901,7 @@ networkRadvdConfContents(virNetworkObjPtr obj,
|
|||||||
|
|
||||||
*configstr = virBufferContentAndReset(&configbuf);
|
*configstr = virBufferContentAndReset(&configbuf);
|
||||||
|
|
||||||
ret = 0;
|
return 0;
|
||||||
cleanup:
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user