diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 2466df735d..f660aa685c 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -4967,7 +4967,6 @@ qemu-kvm -net nic,model=? /dev/null <source network='default'/> <target dev='vnet0'/> <ip address='192.168.122.5' prefix='24'/> - <ip address='192.168.122.5' prefix='24' peer='10.0.0.10'/> <route family='ipv4' address='192.168.122.0' prefix='24' gateway='192.168.122.1'/> <route family='ipv4' address='192.168.122.8' gateway='192.168.122.1'/> </interface> @@ -4986,30 +4985,21 @@ qemu-kvm -net nic,model=? /dev/null

- Since 1.2.12 network devices and - hostdev devices with network capabilities can optionally be provided - one or more IP addresses to set on the network device in the - guest. Note that some hypervisors or network device types will - simply ignore them or only use the first one. - The family attribute can be set to - either ipv4 or ipv6, and the - address attribute contains the IP address. The - optional prefix is the number of 1 bits in the - netmask, and will be automatically set if not specified - for - IPv4 the default prefix is determined according to the network - "class" (A, B, or C - see RFC870), and for IPv6 the default - prefix is 64. The optional peer attribute holds the - IP address of the other end of a point-to-point network - device (since 2.0.0). + Since 1.2.12 the network devices and host devices + with network capabilities can be provided zero or more IP addresses to set + on the target device. Note that some hypervisors or network device types + will simply ignore them or only use the first one. The family + attribute can be set to either ipv4 or ipv6, the + address attribute holds the IP address. The prefix + is not mandatory since some hypervisors do not handle it.

- Since 1.2.12 route elements can also be - added to define IP routes to add in the guest. The attributes of - this element are described in the documentation for - the route element - in network - definitions. This is used by the LXC driver. + Since 1.2.12 route elements can also be added + to define the network routes to use for the network device. The attributes + of this element are described in the documentation for the route + element in network definitions. + This is only used by the LXC driver.

vhost-user interface
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 2d12da95e3..563cb3c437 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -2629,11 +2629,6 @@ - - - - - diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 3a81f7e2aa..ef266afae7 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -6121,7 +6121,7 @@ virDomainNetIPParseXML(xmlNodePtr node) unsigned int prefixValue = 0; char *familyStr = NULL; int family = AF_UNSPEC; - char *address = NULL, *peer = NULL; + char *address = NULL; if (!(address = virXMLPropString(node, "address"))) { virReportError(VIR_ERR_XML_ERROR, "%s", @@ -6159,13 +6159,6 @@ virDomainNetIPParseXML(xmlNodePtr node) } ip->prefix = prefixValue; - if ((peer = virXMLPropString(node, "peer")) != NULL && - virSocketAddrParse(&ip->peer, peer, family) < 0) { - virReportError(VIR_ERR_INVALID_ARG, - _("Invalid peer '%s' in "), peer); - goto cleanup; - } - ret = ip; ip = NULL; @@ -6173,7 +6166,6 @@ virDomainNetIPParseXML(xmlNodePtr node) VIR_FREE(prefixStr); VIR_FREE(familyStr); VIR_FREE(address); - VIR_FREE(peer); VIR_FREE(ip); return ret; } @@ -20272,12 +20264,6 @@ virDomainNetIPInfoFormat(virBufferPtr buf, virBufferAsprintf(buf, " family='%s'", familyStr); if (def->ips[i]->prefix) virBufferAsprintf(buf, " prefix='%u'", def->ips[i]->prefix); - if (VIR_SOCKET_ADDR_VALID(&def->ips[i]->peer)) { - if (!(ipStr = virSocketAddrFormat(&def->ips[i]->peer))) - return -1; - virBufferAsprintf(buf, " peer='%s'", ipStr); - VIR_FREE(ipStr); - } virBufferAddLit(buf, "/>\n"); } diff --git a/src/util/virnetdevip.h b/src/util/virnetdevip.h index 8277654033..86fb77e285 100644 --- a/src/util/virnetdevip.h +++ b/src/util/virnetdevip.h @@ -26,9 +26,8 @@ # include "virsocketaddr.h" typedef struct { - virSocketAddr address; /* ipv4 or ipv6 address */ - virSocketAddr peer; /* ipv4 or ipv6 address of peer */ - unsigned int prefix; /* number of 1 bits in the netmask */ + virSocketAddr address; /* ipv4 or ipv6 address */ + unsigned int prefix; /* number of 1 bits in the net mask */ } virNetDevIPAddr, *virNetDevIPAddrPtr; typedef struct {