mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
interface: allow multiple IPv4 addresses + dhcp on a single interface
As of netcf-0.2.8, netcf supports configuring multipl IPv4 addresses, as well as simultaneously configuring dhcp and static IPv4 addresses, on a single interface. This patch updates libvirt's interface.rng to allow such configurations. This resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1223688
This commit is contained in:
parent
474523fa2c
commit
ba5566e80f
@ -323,24 +323,22 @@
|
|||||||
<value>ipv4</value>
|
<value>ipv4</value>
|
||||||
</attribute>
|
</attribute>
|
||||||
<interleave>
|
<interleave>
|
||||||
<choice>
|
<optional>
|
||||||
<ref name="dhcp-element"/>
|
<ref name="dhcp-element"/>
|
||||||
<group>
|
</optional>
|
||||||
<oneOrMore>
|
<zeroOrMore>
|
||||||
<element name="ip">
|
<element name="ip">
|
||||||
<attribute name="address"><ref name="ipv4Addr"/></attribute>
|
<attribute name="address"><ref name="ipv4Addr"/></attribute>
|
||||||
<optional>
|
|
||||||
<attribute name="prefix"><ref name="ipv4Prefix"/></attribute>
|
|
||||||
</optional>
|
|
||||||
</element>
|
|
||||||
</oneOrMore>
|
|
||||||
<optional>
|
<optional>
|
||||||
<element name="route">
|
<attribute name="prefix"><ref name="ipv4Prefix"/></attribute>
|
||||||
<attribute name="gateway"><ref name="ipv4Addr"/></attribute>
|
|
||||||
</element>
|
|
||||||
</optional>
|
</optional>
|
||||||
</group>
|
</element>
|
||||||
</choice>
|
</zeroOrMore>
|
||||||
|
<optional>
|
||||||
|
<element name="route">
|
||||||
|
<attribute name="gateway"><ref name="ipv4Addr"/></attribute>
|
||||||
|
</element>
|
||||||
|
</optional>
|
||||||
</interleave>
|
</interleave>
|
||||||
</element>
|
</element>
|
||||||
</define>
|
</define>
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
<interface type='ethernet' name='eth1'>
|
||||||
|
<start mode='onboot'/>
|
||||||
|
<protocol family='ipv4'>
|
||||||
|
<dhcp peerdns='yes'/>
|
||||||
|
<ip address='192.168.0.5' prefix='24'/>
|
||||||
|
<ip address='1.2.3.4' prefix='32'/>
|
||||||
|
<route gateway='192.168.0.1'/>
|
||||||
|
</protocol>
|
||||||
|
</interface>
|
@ -75,6 +75,7 @@ mymain(void)
|
|||||||
ret = -1
|
ret = -1
|
||||||
|
|
||||||
DO_TEST("ethernet-dhcp");
|
DO_TEST("ethernet-dhcp");
|
||||||
|
DO_TEST("ethernet-dhcp-and-multi-static");
|
||||||
DO_TEST("ethernet-static");
|
DO_TEST("ethernet-static");
|
||||||
DO_TEST("ethernet-static-no-prefix");
|
DO_TEST("ethernet-static-no-prefix");
|
||||||
DO_TEST("bridge");
|
DO_TEST("bridge");
|
||||||
|
Loading…
Reference in New Issue
Block a user