
On 12/30/2014 05:27 AM, Cédric Bosdonnat wrote:
Network interfaces devices and host devices with net capabilities can now have IPv4 and/or an IPv6 routes configured. --- docs/formatdomain.html.in | 19 ++++- docs/schemas/domaincommon.rng | 31 ++++++++ src/conf/domain_conf.c | 135 ++++++++++++++++++++++++++++++++++- src/conf/domain_conf.h | 12 ++++ src/util/virnetdev.c | 31 +++++++- src/util/virnetdev.h | 2 +- src/util/virsocketaddr.h | 2 + tests/lxcxml2xmldata/lxc-hostdev.xml | 2 + tests/lxcxml2xmldata/lxc-idmap.xml | 2 + 9 files changed, 230 insertions(+), 6 deletions(-)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 3f203a5..499879e 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -4328,14 +4328,18 @@ qemu-kvm -net nic,model=? /dev/null <interface type='network'> <source network='default'/> <target dev='vnet0'/> - <b><ip family='ipv4' address='192.168.122.5' prefix='24'/></b> + <b><ip address='192.168.122.5' prefix='24'/></b> + <b><route family='ipv4' address='192.168.122.0' prefix='24' via='192.168.122.1'/></b> + <b><route family='ipv4' via='192.168.122.1'/></b>
Sorry I didn't see this before - we already have an XML specification for a <route> element in libvirt networks, and had decided that the gateway should be called, well, "gateway" instead of "via". It also includes a "metric" attribute. I think these two <route> elements should share their syntax, RNG, and parse/format functions. Fortunately we haven't yet done a release with this new functionality, so such a change is still possible. Shall I send a patch for this?