1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-01-13 17:18:01 +03:00
Jianwei Hu 2a8fabba18 Maximum vlanid should be 4095 in interface.rng
The correct vlanid range is 0~4095.

After merging this patch, we can not validate a interface xml with vlanid >= 4096.
[root@localhost ~]# cat vlan.xml
<interface type='vlan' name='eno1.4096'>
   <start mode='onboot'/>
   <protocol family='ipv4'>
    <dhcp/>
   </protocol>
   <vlan tag='4096'>
     <interface name='eno1'/>
   </vlan>
</interface>
[root@localhost ~]# virt-xml-validate vlan.xml
vlan.xml:1: element interface: Relax-NG validity error : Invalid sequence in interleave
vlan.xml:6: element vlan: Relax-NG validity error : Element interface failed to validate content
vlan.xml:6: element vlan: Relax-NG validity error : Element vlan failed to validate attributes
vlan.xml fails to validate
[root@localhost ~]#

Here is a ip command help on this.
[root@localhost /]# ip link add link eno1 name eno1.90 type vlan help
Usage: ... vlan [ protocol VLANPROTO ] id VLANID                [ FLAG-LIST ]
                [ ingress-qos-map QOS-MAP ] [ egress-qos-map QOS-MAP ]

VLANPROTO: [ 802.1Q / 802.1ad ]
VLANID := 0-4095
FLAG-LIST := [ FLAG-LIST ] FLAG
FLAG := [ reorder_hdr { on | off } ] [ gvrp { on | off } ] [ mvrp { on | off } ]
        [ loose_binding { on | off } ]
QOS-MAP := [ QOS-MAP ] QOS-MAPPING
QOS-MAPPING := FROM:TO
2014-08-14 15:04:11 +02:00
..
2014-06-26 15:25:05 -06:00
2013-12-02 10:21:26 +08:00
2014-03-01 23:44:58 +04:00
2014-03-03 17:41:26 +04:00
2013-12-02 10:21:26 +08:00
2014-02-18 14:46:49 +01:00
2014-03-01 23:44:58 +04:00
2009-07-16 15:06:42 +02:00
2014-08-03 08:55:15 -04:00
2009-07-29 09:04:21 +01:00
2013-12-02 10:21:26 +08:00
2013-09-12 17:18:32 +08:00
2013-11-26 18:37:09 +08:00
2014-07-03 12:22:37 +02:00
2014-08-12 19:40:20 +04:00