mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-29 17:33:09 +00:00
* src/openvz_driver.c: fix the mac addresses generation for OpenVZ veth
devices, patch by Evgeniy Sokolov * docs/apps.html: regenerated fixing a typo Daniel
This commit is contained in:
parent
fbba4423e9
commit
d6eceb568f
@ -1,3 +1,8 @@
|
|||||||
|
Wed Jan 7 11:54:06 CET 2009 Daniel Veillard <veillard@redhat.com>
|
||||||
|
|
||||||
|
* src/openvz_driver.c: fix the mac addresses generation for
|
||||||
|
OpenVZ veth devices, patch by Evgeniy Sokolov
|
||||||
|
|
||||||
Wed Jan 7 11:38:04 CET 2009 Daniel Veillard <veillard@redhat.com>
|
Wed Jan 7 11:38:04 CET 2009 Daniel Veillard <veillard@redhat.com>
|
||||||
|
|
||||||
* src/libvirt_private.syms src/qemu_driver.c src/test.c
|
* src/libvirt_private.syms src/qemu_driver.c src/test.c
|
||||||
|
@ -141,7 +141,7 @@
|
|||||||
</dd></dl>
|
</dd></dl>
|
||||||
<h2>Monitoring plugins</h2>
|
<h2>Monitoring plugins</h2>
|
||||||
<dl><dt><a href="http://honk.sigxcpu.org/projects/libvirt/#munin">for munin</a></dt><dd>
|
<dl><dt><a href="http://honk.sigxcpu.org/projects/libvirt/#munin">for munin</a></dt><dd>
|
||||||
The plugins provided by Guido Günther allows to monitor various things
|
The plugins provided by Guido Günther allow to monitor various things
|
||||||
like network and block I/O with
|
like network and block I/O with
|
||||||
<a href="http://munin.projects.linpro.no/">Munin</a>.
|
<a href="http://munin.projects.linpro.no/">Munin</a>.
|
||||||
</dd><dt><a href="http://collectd.org/plugins/libvirt.shtml">for collectd</a></dt><dd>
|
</dd><dt><a href="http://collectd.org/plugins/libvirt.shtml">for collectd</a></dt><dd>
|
||||||
|
@ -473,6 +473,8 @@ openvzDomainSetNetwork(virConnectPtr conn, const char *vpsid,
|
|||||||
int rc = 0, narg;
|
int rc = 0, narg;
|
||||||
const char *prog[OPENVZ_MAX_ARG];
|
const char *prog[OPENVZ_MAX_ARG];
|
||||||
char macaddr[VIR_MAC_STRING_BUFLEN];
|
char macaddr[VIR_MAC_STRING_BUFLEN];
|
||||||
|
unsigned char host_mac[VIR_MAC_BUFLEN];
|
||||||
|
char host_macaddr[VIR_MAC_STRING_BUFLEN];
|
||||||
struct openvz_driver *driver = conn->privateData;
|
struct openvz_driver *driver = conn->privateData;
|
||||||
char *opt = NULL;
|
char *opt = NULL;
|
||||||
|
|
||||||
@ -507,6 +509,8 @@ openvzDomainSetNetwork(virConnectPtr conn, const char *vpsid,
|
|||||||
}
|
}
|
||||||
|
|
||||||
virFormatMacAddr(net->mac, macaddr);
|
virFormatMacAddr(net->mac, macaddr);
|
||||||
|
virCapabilitiesGenerateMac(driver->caps, host_mac);
|
||||||
|
virFormatMacAddr(host_mac, host_macaddr);
|
||||||
|
|
||||||
if (net->type == VIR_DOMAIN_NET_TYPE_BRIDGE) {
|
if (net->type == VIR_DOMAIN_NET_TYPE_BRIDGE) {
|
||||||
virBuffer buf = VIR_BUFFER_INITIALIZER;
|
virBuffer buf = VIR_BUFFER_INITIALIZER;
|
||||||
@ -541,7 +545,7 @@ openvzDomainSetNetwork(virConnectPtr conn, const char *vpsid,
|
|||||||
virBufferAdd(&buf, dev_name_ve, -1); /* Guest dev */
|
virBufferAdd(&buf, dev_name_ve, -1); /* Guest dev */
|
||||||
virBufferVSprintf(&buf, ",%s", macaddr); /* Guest dev mac */
|
virBufferVSprintf(&buf, ",%s", macaddr); /* Guest dev mac */
|
||||||
virBufferVSprintf(&buf, ",%s", net->ifname); /* Host dev */
|
virBufferVSprintf(&buf, ",%s", net->ifname); /* Host dev */
|
||||||
virBufferVSprintf(&buf, ",%s", macaddr); /* Host dev mac */
|
virBufferVSprintf(&buf, ",%s", host_macaddr); /* Host dev mac */
|
||||||
|
|
||||||
if (driver->version >= VZCTL_BRIDGE_MIN_VERSION) {
|
if (driver->version >= VZCTL_BRIDGE_MIN_VERSION) {
|
||||||
virBufferVSprintf(&buf, ",%s", net->data.bridge.brname); /* Host bridge */
|
virBufferVSprintf(&buf, ",%s", net->data.bridge.brname); /* Host bridge */
|
||||||
@ -549,7 +553,7 @@ openvzDomainSetNetwork(virConnectPtr conn, const char *vpsid,
|
|||||||
virBufferVSprintf(configBuf, "ifname=%s", dev_name_ve);
|
virBufferVSprintf(configBuf, "ifname=%s", dev_name_ve);
|
||||||
virBufferVSprintf(configBuf, ",mac=%s", macaddr); /* Guest dev mac */
|
virBufferVSprintf(configBuf, ",mac=%s", macaddr); /* Guest dev mac */
|
||||||
virBufferVSprintf(configBuf, ",host_ifname=%s", net->ifname); /* Host dev */
|
virBufferVSprintf(configBuf, ",host_ifname=%s", net->ifname); /* Host dev */
|
||||||
virBufferVSprintf(configBuf, ",host_mac=%s", macaddr); /* Host dev mac */
|
virBufferVSprintf(configBuf, ",host_mac=%s", host_macaddr); /* Host dev mac */
|
||||||
virBufferVSprintf(configBuf, ",bridge=%s", net->data.bridge.brname); /* Host bridge */
|
virBufferVSprintf(configBuf, ",bridge=%s", net->data.bridge.brname); /* Host bridge */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user