mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
Revert "libvirt domain xml allow to set peer address"
This reverts commit 690969af9c
, which
added the domain config parts to support a "peer" attribute in domain
interface <ip> elements.
It's being removed temporarily for the release of libvirt 1.3.4
because the feature doesn't work, and there are concerns that it may
need to be modified in an externally visible manner which could create
backward compatibility problems.
This commit is contained in:
parent
5ba48584fb
commit
1d14b13f3b
@ -4836,7 +4836,6 @@ qemu-kvm -net nic,model=? /dev/null
|
|||||||
<source network='default'/>
|
<source network='default'/>
|
||||||
<target dev='vnet0'/>
|
<target dev='vnet0'/>
|
||||||
<b><ip address='192.168.122.5' prefix='24'/></b>
|
<b><ip address='192.168.122.5' prefix='24'/></b>
|
||||||
<b><ip address='192.168.122.5' prefix='24' peer='10.0.0.10'/></b>
|
|
||||||
<b><route family='ipv4' address='192.168.122.0' prefix='24' gateway='192.168.122.1'/></b>
|
<b><route family='ipv4' address='192.168.122.0' prefix='24' gateway='192.168.122.1'/></b>
|
||||||
<b><route family='ipv4' address='192.168.122.8' gateway='192.168.122.1'/></b>
|
<b><route family='ipv4' address='192.168.122.8' gateway='192.168.122.1'/></b>
|
||||||
</interface>
|
</interface>
|
||||||
@ -4869,16 +4868,7 @@ qemu-kvm -net nic,model=? /dev/null
|
|||||||
to define the network routes to use for the network device. The attributes
|
to define the network routes to use for the network device. The attributes
|
||||||
of this element are described in the documentation for the <code>route</code>
|
of this element are described in the documentation for the <code>route</code>
|
||||||
element in <a href="formatnetwork.html#elementsStaticroute">network definitions</a>.
|
element in <a href="formatnetwork.html#elementsStaticroute">network definitions</a>.
|
||||||
This is used by the LXC driver and <span class="since">Since 1.3.3</span> by the QEMU
|
This is only used by the LXC driver.
|
||||||
driver.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p>
|
|
||||||
<span class="since">Since 1.3.3</span> ip elements can hold peer attribute to assign
|
|
||||||
a point-to-point address for the network device. The attributes of this element
|
|
||||||
are described in the documentation for the <code>ip</code> element in
|
|
||||||
<a href="formatnetwork.html#elementsAddress">network definitions</a>.
|
|
||||||
This is only used by the LXC and QEMU drivers.
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h5><a name="elementVhostuser">vhost-user interface</a></h5>
|
<h5><a name="elementVhostuser">vhost-user interface</a></h5>
|
||||||
|
@ -2410,11 +2410,6 @@
|
|||||||
<ref name="ipPrefix"/>
|
<ref name="ipPrefix"/>
|
||||||
</attribute>
|
</attribute>
|
||||||
</optional>
|
</optional>
|
||||||
<optional>
|
|
||||||
<attribute name="peer">
|
|
||||||
<ref name="ipAddr"/>
|
|
||||||
</attribute>
|
|
||||||
</optional>
|
|
||||||
<empty/>
|
<empty/>
|
||||||
</element>
|
</element>
|
||||||
</zeroOrMore>
|
</zeroOrMore>
|
||||||
|
@ -5744,7 +5744,7 @@ virDomainNetIpParseXML(xmlNodePtr node)
|
|||||||
unsigned int prefixValue = 0;
|
unsigned int prefixValue = 0;
|
||||||
char *familyStr = NULL;
|
char *familyStr = NULL;
|
||||||
int family = AF_UNSPEC;
|
int family = AF_UNSPEC;
|
||||||
char *address = NULL, *peer = NULL;
|
char *address = NULL;
|
||||||
|
|
||||||
if (!(prefixStr = virXMLPropString(node, "prefix")) ||
|
if (!(prefixStr = virXMLPropString(node, "prefix")) ||
|
||||||
(virStrToLong_ui(prefixStr, NULL, 10, &prefixValue) < 0)) {
|
(virStrToLong_ui(prefixStr, NULL, 10, &prefixValue) < 0)) {
|
||||||
@ -5758,9 +5758,6 @@ virDomainNetIpParseXML(xmlNodePtr node)
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((peer = virXMLPropString(node, "peer")) == NULL)
|
|
||||||
VIR_DEBUG("Peer is empty");
|
|
||||||
|
|
||||||
familyStr = virXMLPropString(node, "family");
|
familyStr = virXMLPropString(node, "family");
|
||||||
if (familyStr && STREQ(familyStr, "ipv4"))
|
if (familyStr && STREQ(familyStr, "ipv4"))
|
||||||
family = AF_INET;
|
family = AF_INET;
|
||||||
@ -5778,14 +5775,6 @@ virDomainNetIpParseXML(xmlNodePtr node)
|
|||||||
address);
|
address);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((peer != NULL) && (virSocketAddrParse(&ip->peer, peer, family) < 0)) {
|
|
||||||
virReportError(VIR_ERR_INVALID_ARG,
|
|
||||||
_("Failed to parse IP address: '%s'"),
|
|
||||||
peer);
|
|
||||||
goto cleanup;
|
|
||||||
}
|
|
||||||
|
|
||||||
ip->prefix = prefixValue;
|
ip->prefix = prefixValue;
|
||||||
|
|
||||||
ret = ip;
|
ret = ip;
|
||||||
@ -5795,7 +5784,6 @@ virDomainNetIpParseXML(xmlNodePtr node)
|
|||||||
VIR_FREE(prefixStr);
|
VIR_FREE(prefixStr);
|
||||||
VIR_FREE(familyStr);
|
VIR_FREE(familyStr);
|
||||||
VIR_FREE(address);
|
VIR_FREE(address);
|
||||||
VIR_FREE(peer);
|
|
||||||
VIR_FREE(ip);
|
VIR_FREE(ip);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -514,7 +514,6 @@ typedef struct _virDomainNetIpDef virDomainNetIpDef;
|
|||||||
typedef virDomainNetIpDef *virDomainNetIpDefPtr;
|
typedef virDomainNetIpDef *virDomainNetIpDefPtr;
|
||||||
struct _virDomainNetIpDef {
|
struct _virDomainNetIpDef {
|
||||||
virSocketAddr address; /* ipv4 or ipv6 address */
|
virSocketAddr address; /* ipv4 or ipv6 address */
|
||||||
virSocketAddr peer; /* ipv4 or ipv6 address of peer */
|
|
||||||
unsigned int prefix; /* number of 1 bits in the net mask */
|
unsigned int prefix; /* number of 1 bits in the net mask */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user