]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Implement usernet address
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 13 Sep 2017 09:16:04 +0000 (11:16 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 18 Sep 2017 11:54:27 +0000 (13:54 +0200)
commit8703813aae3de35c2042e26dc1c9556783156529
treede4e903c35501b8e6184c182da8173b8537077ea
parentd1dbb3078245b44186f6b3f09b6e66fe98b4bede
qemu: Implement usernet address

https://bugzilla.redhat.com/show_bug.cgi?id=1075520

Apart from generic checks, we need to constrain netmask/prefix
length a bit. Thing is, with current implementation QEMU needs to
be able to 'assign' some IP addresses to the virtual network. For
instance, the default gateway is at x.x.x.2, dns is at x.x.x.3,
the default DHCP range is x.x.x.15-x.x.x.30. Since we don't
expose these settings yet, it's safer to require shorter prefix
to have room for the defaults.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: laine@laine.org
src/qemu/qemu_command.c
src/qemu/qemu_domain.c
tests/qemuxml2argvdata/qemuxml2argv-net-user-addr.args [new file with mode: 0644]
tests/qemuxml2argvtest.c