From nobody Thu May 15 17:16:51 2025
Delivered-To: importer@patchew.org
Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28
as permitted sender) client-ip=209.132.183.28;
envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com;
Authentication-Results: mx.zohomail.com;
spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as
permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com
Return-Path:
Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by
mx.zohomail.com
with SMTPS id 1505209104563281.0501546240555;
Tue, 12 Sep 2017 02:38:24 -0700 (PDT)
Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com
[10.5.11.16])
(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
(No client certificate requested)
by mx1.redhat.com (Postfix) with ESMTPS id 48C3F13A54;
Tue, 12 Sep 2017 09:38:23 +0000 (UTC)
Received: from colo-mx.corp.redhat.com
(colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20])
by smtp.corp.redhat.com (Postfix) with ESMTPS id 0708F5C1A1;
Tue, 12 Sep 2017 09:38:23 +0000 (UTC)
Received: from lists01.pubmisc.prod.ext.phx2.redhat.com
(lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33])
by colo-mx.corp.redhat.com (Postfix) with ESMTP id 38C50180884A;
Tue, 12 Sep 2017 09:38:22 +0000 (UTC)
Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com
[10.5.11.13])
by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
id v8C9X6uv005438 for ;
Tue, 12 Sep 2017 05:33:06 -0400
Received: by smtp.corp.redhat.com (Postfix)
id 6764B6062A; Tue, 12 Sep 2017 09:33:06 +0000 (UTC)
Received: from moe.brq.redhat.com (unknown [10.43.2.192])
by smtp.corp.redhat.com (Postfix) with ESMTP id BCF3D17CD7;
Tue, 12 Sep 2017 09:33:05 +0000 (UTC)
DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 48C3F13A54
Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com;
dmarc=none (p=none dis=none) header.from=redhat.com
Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com;
spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com
From: Michal Privoznik
To: libvir-list@redhat.com
Date: Tue, 12 Sep 2017 11:32:52 +0200
Message-Id:
In-Reply-To:
References:
In-Reply-To:
References:
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13
X-loop: libvir-list@redhat.com
Cc: laine@laine.org
Subject: [libvirt] [PATCH 4/5] conf: Allow usernet to have an address
X-BeenThere: libvir-list@redhat.com
X-Mailman-Version: 2.1.12
Precedence: junk
List-Id: Development discussions about the libvirt library & tools
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Sender: libvir-list-bounces@redhat.com
Errors-To: libvir-list-bounces@redhat.com
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16
X-Greylist: Sender IP whitelisted,
not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]);
Tue, 12 Sep 2017 09:38:24 +0000 (UTC)
X-ZohoMail: RSF_0 Z_629925259 SPT_0
Content-Type: text/plain; charset="utf-8"
https://bugzilla.redhat.com/show_bug.cgi?id=3D1075520
Currently, all that users can specify for an interface type of
'user' is the common attributes: PCI address, NIC model (and
that's basically it). However, some need to configure other
address range than the default one.
Signed-off-by: Michal Privoznik
---
Notes:
Frankly, I'm not that convinced about this one. I mean,
this puts IP addresses into net->hostIP while we are
configuring guest side of the SLIRP. However, it just
feels better to have the IP addresses under
than under . Which actually is the other
option. So it's either:
=20
=20
for net->hostIP, or it's:
=20
=20
for net->guestIP. I went for the former one, but I
don't have a strong opinion on that.
docs/formatdomain.html.in | 13 ++++++-
docs/schemas/domaincommon.rng | 5 +++
src/conf/domain_conf.c | 5 +--
.../qemuxml2argv-net-user-addr.xml | 42 ++++++++++++++++++=
++++
.../qemuxml2xmlout-net-user-addr.xml | 1 +
tests/qemuxml2xmltest.c | 1 +
6 files changed, 64 insertions(+), 3 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-net-user-addr.xml
create mode 120000 tests/qemuxml2xmloutdata/qemuxml2xmlout-net-user-addr.x=
ml
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 8ca7637a4..65a8886ee 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -4701,7 +4701,14 @@
starting from 10.0.2.15. The default router will be
10.0.2.2 and the DNS server will be 10.0.2.3.
This networking is the only option for unprivileged users who need t=
heir
- VMs to have outgoing access.
+ VMs to have outgoing access. However, since
+ 3.8.0, it is possible to override the default network by
+ including source element. The element can have ip=
+ element for each IPv4 and IPv6. The element has family
+ attribute which accepts ipv4 and ipv6 valu=
es.
+ Then there's address attribute for specifying IP address
+ corresponding to the family. Optionally, the default prefix length c=
an be
+ overridden via prefix attribute.