From 85d0ae7b434a3ae9f3bd50ad7fee1fcd23b26a26 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Tue, 20 Apr 2021 21:01:59 +0200 Subject: xml: T3488: when using regex one must use ^ and $ when checking string literals --- interface-definitions/dhcp-server.xml.in | 2 +- interface-definitions/flow-accounting-conf.xml.in | 8 ++++---- .../include/accel-ppp/auth-mode.xml.i | 2 +- .../include/accel-ppp/auth-protocols.xml.i | 2 +- .../include/interface/vif-s.xml.i | 2 +- .../include/isis/isis-common-config.xml.i | 6 +++--- interface-definitions/interfaces-bonding.xml.in | 4 ++-- interface-definitions/interfaces-ethernet.xml.in | 4 ++-- interface-definitions/interfaces-l2tpv3.xml.in | 2 +- interface-definitions/interfaces-pppoe.xml.in | 2 +- .../interfaces-pseudo-ethernet.xml.in | 2 +- interface-definitions/nat.xml.in | 2 +- interface-definitions/nat66.xml.in | 4 ++-- interface-definitions/salt-minion.xml.in | 2 +- .../service-ids-ddos-protection.xml.in | 2 +- interface-definitions/service_ipoe-server.xml.in | 6 +++--- interface-definitions/service_pppoe-server.xml.in | 6 +++--- interface-definitions/service_router-advert.xml.in | 2 +- interface-definitions/system-console.xml.in | 2 +- interface-definitions/system-ip.xml.in | 2 +- interface-definitions/system-ipv6.xml.in | 2 +- interface-definitions/system-syslog.xml.in | 22 +++++++++++----------- interface-definitions/vpn_l2tp.xml.in | 4 ++-- interface-definitions/vpn_openconnect.xml.in | 2 +- interface-definitions/vpn_pptp.xml.in | 2 +- interface-definitions/vrrp.xml.in | 2 +- 26 files changed, 49 insertions(+), 49 deletions(-) (limited to 'interface-definitions') diff --git a/interface-definitions/dhcp-server.xml.in b/interface-definitions/dhcp-server.xml.in index 28b61e92d..015500043 100644 --- a/interface-definitions/dhcp-server.xml.in +++ b/interface-definitions/dhcp-server.xml.in @@ -198,7 +198,7 @@ primary secondary - (primary|secondary) + ^(primary|secondary)$ Invalid DHCP failover peer status diff --git a/interface-definitions/flow-accounting-conf.xml.in b/interface-definitions/flow-accounting-conf.xml.in index 830078abe..b3980d9e2 100644 --- a/interface-definitions/flow-accounting-conf.xml.in +++ b/interface-definitions/flow-accounting-conf.xml.in @@ -39,9 +39,6 @@ auth authpriv cron daemon kern lpr mail mark news protocols security syslog user uucp local0 local1 local2 local3 local4 local5 local6 local7 all - - auth|authpriv|cron|daemon|kern|lpr|mail|mark|news|protocols|security|syslog|user|uucp|local0|local1|local2|local3|local4|local5|local6|local7|all - auth Authentication and authorization @@ -134,6 +131,9 @@ all Authentication and authorization + + ^(auth|authpriv|cron|daemon|kern|lpr|mail|mark|news|protocols|security|syslog|user|uucp|local0|local1|local2|local3|local4|local5|local6|local7|all)$ + @@ -381,7 +381,7 @@ - auto$ + ^auto$ diff --git a/interface-definitions/include/accel-ppp/auth-mode.xml.i b/interface-definitions/include/accel-ppp/auth-mode.xml.i index c1a87cfe3..a7711b675 100644 --- a/interface-definitions/include/accel-ppp/auth-mode.xml.i +++ b/interface-definitions/include/accel-ppp/auth-mode.xml.i @@ -11,7 +11,7 @@ Use RADIUS server for user autentication - (local|radius) + ^(local|radius)$ local radius diff --git a/interface-definitions/include/accel-ppp/auth-protocols.xml.i b/interface-definitions/include/accel-ppp/auth-protocols.xml.i index d43266152..480747f53 100644 --- a/interface-definitions/include/accel-ppp/auth-protocols.xml.i +++ b/interface-definitions/include/accel-ppp/auth-protocols.xml.i @@ -22,7 +22,7 @@ Authentication via MS-CHAPv2 (Microsoft Challenge Handshake Authentication Protocol, version 2) - (pap|chap|mschap|mschap-v2) + ^(pap|chap|mschap|mschap-v2)$ diff --git a/interface-definitions/include/interface/vif-s.xml.i b/interface-definitions/include/interface/vif-s.xml.i index 045fd3e24..17d1746be 100644 --- a/interface-definitions/include/interface/vif-s.xml.i +++ b/interface-definitions/include/interface/vif-s.xml.i @@ -29,7 +29,7 @@ VLAN-tagged frame (IEEE 802.1q), ethertype 0x8100 - (802.1q|802.1ad) + ^(802.1q|802.1ad)$ Ethertype must be 802.1ad or 802.1q diff --git a/interface-definitions/include/isis/isis-common-config.xml.i b/interface-definitions/include/isis/isis-common-config.xml.i index 8b753b082..2caafc1a6 100644 --- a/interface-definitions/include/isis/isis-common-config.xml.i +++ b/interface-definitions/include/isis/isis-common-config.xml.i @@ -140,7 +140,7 @@ Act as an area router - (level-1|level-1-2|level-2) + ^(level-1|level-1-2|level-2)$ @@ -211,7 +211,7 @@ Use new style of TLVs to carry wider metric - (narrow|transition|wide) + ^(narrow|transition|wide)$ @@ -644,7 +644,7 @@ Level-2 only adjacencies are formed - (level-1|level-1-2|level-2-only) + ^(level-1|level-1-2|level-2-only)$ diff --git a/interface-definitions/interfaces-bonding.xml.in b/interface-definitions/interfaces-bonding.xml.in index 4382433b2..846f6eb54 100644 --- a/interface-definitions/interfaces-bonding.xml.in +++ b/interface-definitions/interfaces-bonding.xml.in @@ -75,7 +75,7 @@ combine IP address and port to make hash - (layer2\+3|layer3\+4|layer2) + ^(layer2\+3|layer3\+4|layer2)$ hash-policy must be layer2 layer2+3 or layer3+4 @@ -132,7 +132,7 @@ Distribute based on MAC address - (802.3ad|active-backup|broadcast|round-robin|transmit-load-balance|adaptive-load-balance|xor-hash) + ^(802.3ad|active-backup|broadcast|round-robin|transmit-load-balance|adaptive-load-balance|xor-hash)$ mode must be 802.3ad, active-backup, broadcast, round-robin, transmit-load-balance, adaptive-load-balance, or xor diff --git a/interface-definitions/interfaces-ethernet.xml.in b/interface-definitions/interfaces-ethernet.xml.in index 8e426b1af..fff8db2d1 100644 --- a/interface-definitions/interfaces-ethernet.xml.in +++ b/interface-definitions/interfaces-ethernet.xml.in @@ -50,7 +50,7 @@ Full duplex - (auto|half|full) + ^(auto|half|full)$ duplex must be auto, half or full @@ -157,7 +157,7 @@ 100 Gbit/sec - (auto|10|100|1000|2500|5000|10000|25000|40000|50000|100000) + ^(auto|10|100|1000|2500|5000|10000|25000|40000|50000|100000)$ Speed must be auto, 10, 100, 1000, 2500, 5000, 10000, 25000, 40000, 50000 or 100000 diff --git a/interface-definitions/interfaces-l2tpv3.xml.in b/interface-definitions/interfaces-l2tpv3.xml.in index 831b9b47a..ffb57203e 100644 --- a/interface-definitions/interfaces-l2tpv3.xml.in +++ b/interface-definitions/interfaces-l2tpv3.xml.in @@ -47,7 +47,7 @@ IP encapsulation - (udp|ip) + ^(udp|ip)$ Encapsulation must be UDP or IP diff --git a/interface-definitions/interfaces-pppoe.xml.in b/interface-definitions/interfaces-pppoe.xml.in index a8e371f85..8c2b50eba 100644 --- a/interface-definitions/interfaces-pppoe.xml.in +++ b/interface-definitions/interfaces-pppoe.xml.in @@ -50,7 +50,7 @@ auto none force - (auto|none|force) + ^(auto|none|force)$ PPPoE default-route option must be 'auto', 'none', or 'force' diff --git a/interface-definitions/interfaces-pseudo-ethernet.xml.in b/interface-definitions/interfaces-pseudo-ethernet.xml.in index 9e3e0cb26..136841290 100644 --- a/interface-definitions/interfaces-pseudo-ethernet.xml.in +++ b/interface-definitions/interfaces-pseudo-ethernet.xml.in @@ -50,7 +50,7 @@ Promicious mode passthrough of underlying device - (private|vepa|bridge|passthru) + ^(private|vepa|bridge|passthru)$ mode must be private, vepa, bridge or passthru diff --git a/interface-definitions/nat.xml.in b/interface-definitions/nat.xml.in index 3cff8abc9..9862f49b2 100644 --- a/interface-definitions/nat.xml.in +++ b/interface-definitions/nat.xml.in @@ -96,7 +96,7 @@ - (masquerade) + ^(masquerade)$ diff --git a/interface-definitions/nat66.xml.in b/interface-definitions/nat66.xml.in index d5e1226f9..7b1ec3706 100644 --- a/interface-definitions/nat66.xml.in +++ b/interface-definitions/nat66.xml.in @@ -94,7 +94,7 @@ - (masquerade) + ^(masquerade)$ @@ -144,7 +144,7 @@ Inbound interface of NAT66 traffic any - + diff --git a/interface-definitions/salt-minion.xml.in b/interface-definitions/salt-minion.xml.in index c43374a0a..d3b022d12 100644 --- a/interface-definitions/salt-minion.xml.in +++ b/interface-definitions/salt-minion.xml.in @@ -15,7 +15,7 @@ md5 sha1 sha224 sha256 sha384 sha512 - (md5|sha1|sha224|sha256|sha384|sha512) + ^(md5|sha1|sha224|sha256|sha384|sha512)$ diff --git a/interface-definitions/service-ids-ddos-protection.xml.in b/interface-definitions/service-ids-ddos-protection.xml.in index 5e65d3106..ff4c1c24e 100644 --- a/interface-definitions/service-ids-ddos-protection.xml.in +++ b/interface-definitions/service-ids-ddos-protection.xml.in @@ -25,7 +25,7 @@ in out - (in|out) + ^(in|out)$ diff --git a/interface-definitions/service_ipoe-server.xml.in b/interface-definitions/service_ipoe-server.xml.in index d0a05aea6..7c575ba77 100644 --- a/interface-definitions/service_ipoe-server.xml.in +++ b/interface-definitions/service_ipoe-server.xml.in @@ -23,7 +23,7 @@ L2 L3 - (L2|L3) + ^(L2|L3)$ L2 @@ -42,7 +42,7 @@ shared vlan - (shared|vlan) + ^(shared|vlan)$ shared @@ -125,7 +125,7 @@ local radius noauth - (local|radius|noauth) + ^(local|radius|noauth)$ local diff --git a/interface-definitions/service_pppoe-server.xml.in b/interface-definitions/service_pppoe-server.xml.in index 1d3e8ba29..dc8af67af 100644 --- a/interface-definitions/service_pppoe-server.xml.in +++ b/interface-definitions/service_pppoe-server.xml.in @@ -38,7 +38,7 @@ ifname ifname:mac - (ifname|ifname:mac) + ^(ifname|ifname:mac)$ Invalid Called-Station-Id format @@ -168,7 +168,7 @@ IPv4 (IPCP) negotiation algorithm - (deny|allow|prefer|require) + ^(deny|allow|prefer|require)$ invalid value @@ -196,7 +196,7 @@ IPv6 (IPCP6) negotiation algorithm - (deny|allow|prefer|require) + ^(deny|allow|prefer|require)$ invalid value diff --git a/interface-definitions/service_router-advert.xml.in b/interface-definitions/service_router-advert.xml.in index 94255aeb2..47ac4e25d 100644 --- a/interface-definitions/service_router-advert.xml.in +++ b/interface-definitions/service_router-advert.xml.in @@ -215,7 +215,7 @@ - (infinity) + ^(infinity)$ 2592000 diff --git a/interface-definitions/system-console.xml.in b/interface-definitions/system-console.xml.in index 71e63d0cb..88f7f82a9 100644 --- a/interface-definitions/system-console.xml.in +++ b/interface-definitions/system-console.xml.in @@ -71,7 +71,7 @@ 115200 bps - (1200|2400|4800|9600|19200|38400|57600|115200) + ^(1200|2400|4800|9600|19200|38400|57600|115200)$ diff --git a/interface-definitions/system-ip.xml.in b/interface-definitions/system-ip.xml.in index 0bd461042..86fbe5701 100644 --- a/interface-definitions/system-ip.xml.in +++ b/interface-definitions/system-ip.xml.in @@ -20,7 +20,7 @@ 1024 2048 4096 8192 16384 32768 - (1024|2048|4096|8192|16384|32768) + ^(1024|2048|4096|8192|16384|32768)$ 8192 diff --git a/interface-definitions/system-ipv6.xml.in b/interface-definitions/system-ipv6.xml.in index 6ead747a1..5ee7adf54 100644 --- a/interface-definitions/system-ipv6.xml.in +++ b/interface-definitions/system-ipv6.xml.in @@ -45,7 +45,7 @@ 1024 2048 4096 8192 16384 32768 - (1024|2048|4096|8192|16384|32768) + ^(1024|2048|4096|8192|16384|32768)$ diff --git a/interface-definitions/system-syslog.xml.in b/interface-definitions/system-syslog.xml.in index c58922a3d..f3dcae2f3 100644 --- a/interface-definitions/system-syslog.xml.in +++ b/interface-definitions/system-syslog.xml.in @@ -28,7 +28,7 @@ auth authpriv cron daemon kern lpr mail mark news protocols security syslog user uucp local0 local1 local2 local3 local4 local5 local6 local7 all - (auth|authpriv|cron|daemon|kern|lpr|mail|mark|news|protocols|security|syslog|user|uucp|local0|local1|local2|local3|local4|local5|local6|local7|all) + ^(auth|authpriv|cron|daemon|kern|lpr|mail|mark|news|protocols|security|syslog|user|uucp|local0|local1|local2|local3|local4|local5|local6|local7|all)$ Invalid facility type @@ -132,7 +132,7 @@ emerg alert crit err warning notice info debug all - (emerg|alert|crit|err|warning|notice|info|debug|all) + ^(emerg|alert|crit|err|warning|notice|info|debug|all)$ Invalid loglevel @@ -215,7 +215,7 @@ auth authpriv cron daemon kern lpr mail mark news protocols security syslog user uucp local0 local1 local2 local3 local4 local5 local6 local7 all - (auth|authpriv|cron|daemon|kern|lpr|mail|mark|news|protocols|security|syslog|user|uucp|local0|local1|local2|local3|local4|local5|local6|local7|all) + ^(auth|authpriv|cron|daemon|kern|lpr|mail|mark|news|protocols|security|syslog|user|uucp|local0|local1|local2|local3|local4|local5|local6|local7|all)$ Invalid facility type @@ -327,7 +327,7 @@ udp tcp - (udp|tcp) + ^(udp|tcp)$ invalid protocol name @@ -339,7 +339,7 @@ emerg alert crit err warning notice info debug all - (emerg|alert|crit|err|warning|notice|info|debug|all) + ^(emerg|alert|crit|err|warning|notice|info|debug|all)$ Invalid loglevel @@ -434,7 +434,7 @@ auth authpriv cron daemon kern lpr mail mark news protocols security syslog user uucp local0 local1 local2 local3 local4 local5 local6 local7 all - (auth|authpriv|cron|daemon|kern|lpr|mail|mark|news|protocols|security|syslog|user|uucp|local0|local1|local2|local3|local4|local5|local6|local7|all) + ^(auth|authpriv|cron|daemon|kern|lpr|mail|mark|news|protocols|security|syslog|user|uucp|local0|local1|local2|local3|local4|local5|local6|local7|all)$ Invalid facility type @@ -538,7 +538,7 @@ emerg alert crit err warning notice info debug all - (emerg|alert|crit|err|warning|notice|info|debug|all) + ^(emerg|alert|crit|err|warning|notice|info|debug|all)$ Invalid loglevel @@ -645,7 +645,7 @@ auth authpriv cron daemon kern lpr mail mark news protocols security syslog user uucp local0 local1 local2 local3 local4 local5 local6 local7 all - (auth|authpriv|cron|daemon|kern|lpr|mail|mark|news|protocols|security|syslog|user|uucp|local0|local1|local2|local3|local4|local5|local6|local7|all) + ^(auth|authpriv|cron|daemon|kern|lpr|mail|mark|news|protocols|security|syslog|user|uucp|local0|local1|local2|local3|local4|local5|local6|local7|all)$ Invalid facility type @@ -749,7 +749,7 @@ emerg alert crit err warning notice info debug all - (emerg|alert|crit|err|warning|notice|info|debug|all) + ^(emerg|alert|crit|err|warning|notice|info|debug|all)$ Invalid loglevel @@ -806,7 +806,7 @@ auth authpriv cron daemon kern lpr mail mark news protocols security syslog user uucp local0 local1 local2 local3 local4 local5 local6 local7 all - (auth|authpriv|cron|daemon|kern|lpr|mail|mark|news|protocols|security|syslog|user|uucp|local0|local1|local2|local3|local4|local5|local6|local7|all) + ^(auth|authpriv|cron|daemon|kern|lpr|mail|mark|news|protocols|security|syslog|user|uucp|local0|local1|local2|local3|local4|local5|local6|local7|all)$ Invalid facility type @@ -910,7 +910,7 @@ emerg alert crit err warning notice info debug all - (emerg|alert|crit|err|warning|notice|info|debug|all) + ^(emerg|alert|crit|err|warning|notice|info|debug|all)$ Invalid loglevel diff --git a/interface-definitions/vpn_l2tp.xml.in b/interface-definitions/vpn_l2tp.xml.in index 2d8a8503d..5bdebcb05 100644 --- a/interface-definitions/vpn_l2tp.xml.in +++ b/interface-definitions/vpn_l2tp.xml.in @@ -63,7 +63,7 @@ Use X.509 certificate for IPsec authentication - (pre-shared-secret|x509) + ^(pre-shared-secret|x509)$ pre-shared-secret x509 @@ -201,7 +201,7 @@ Require the peer to authenticate itself using MS-CHAPv2 [Microsoft Challenge Handshake Authentication Protocol, Version 2]. - (pap|chap|mschap|mschap-v2) + ^(pap|chap|mschap|mschap-v2)$ pap chap mschap mschap-v2 diff --git a/interface-definitions/vpn_openconnect.xml.in b/interface-definitions/vpn_openconnect.xml.in index f64aa7f23..1a9d39a12 100644 --- a/interface-definitions/vpn_openconnect.xml.in +++ b/interface-definitions/vpn_openconnect.xml.in @@ -25,7 +25,7 @@ Use RADIUS server for user autentication - (local|radius) + ^(local|radius)$ local radius diff --git a/interface-definitions/vpn_pptp.xml.in b/interface-definitions/vpn_pptp.xml.in index 7cf584a18..91c8cd76f 100644 --- a/interface-definitions/vpn_pptp.xml.in +++ b/interface-definitions/vpn_pptp.xml.in @@ -86,7 +86,7 @@ ask client for mppe, if it rejects drop connection - (deny|prefer|require) + ^(deny|prefer|require)$ deny prefer require diff --git a/interface-definitions/vrrp.xml.in b/interface-definitions/vrrp.xml.in index 3c4c9b83c..bb551296f 100644 --- a/interface-definitions/vrrp.xml.in +++ b/interface-definitions/vrrp.xml.in @@ -61,7 +61,7 @@ plaintext-password ah - (plaintext-password|ah) + ^(plaintext-password|ah)$ Authentication type must be plaintext-password or ah -- cgit v1.2.3