diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-09-26 19:24:47 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-09-26 19:28:39 +0200 |
commit | 2f4466802d5448ecee59009686ed7c49c6a392d7 (patch) | |
tree | 1dfa2e2d58e1618b5a69124653d733559797cb54 /interface-definitions/interfaces-vxlan.xml.in | |
parent | aa1362cb4fbb53c6b45e0739b143940f6ec5d85f (diff) | |
download | vyos-1x-2f4466802d5448ecee59009686ed7c49c6a392d7.tar.gz vyos-1x-2f4466802d5448ecee59009686ed7c49c6a392d7.zip |
vxlan: T3867: add multicast validator for group address
The group CLI node takes a multicast IPv4 or IPv6 address - this must be input
validated to not case any OS exception
cpo@LR1.wue3# show interfaces vxlan
vxlan vxlan0 {
+ group 254.0.0.1
source-address 172.18.254.201
+ source-interface dum0
vni 10
}
Results in OSError beeing rasied with the following context:
Error: argument "254.0.0.1" is wrong: invalid group address
(cherry picked from commit 0d7cd4ed5725d3e79faad5abc0801631c2ffc813)
Diffstat (limited to 'interface-definitions/interfaces-vxlan.xml.in')
-rw-r--r-- | interface-definitions/interfaces-vxlan.xml.in | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/interface-definitions/interfaces-vxlan.xml.in b/interface-definitions/interfaces-vxlan.xml.in index a637baf3f..6dcc3f5a0 100644 --- a/interface-definitions/interfaces-vxlan.xml.in +++ b/interface-definitions/interfaces-vxlan.xml.in @@ -31,8 +31,10 @@ <description>Multicast IPv6 group address</description> </valueHelp> <constraint> - <validator name="ip-address"/> + <validator name="ipv4-multicast"/> + <validator name="ipv6-multicast"/> </constraint> + <constraintErrorMessage>Multicast IPv4/IPv6 address required</constraintErrorMessage> </properties> </leafNode> #include <include/interface/ipv4-options.xml.i> |