From 96d846d27ac818ee9a23bb7194bb58cfb7093387 Mon Sep 17 00:00:00 2001 From: Indrajit Raychaudhuri Date: Tue, 16 May 2023 20:49:59 -0500 Subject: T5226: Combine ipv4-address and ipv6-address validators Use a single ip-address validator to combine and replace ipv4-address and ipv6-address validators. --- interface-definitions/container.xml.in | 3 +- interface-definitions/dns-domain-name.xml.in | 3 +- interface-definitions/dns-forwarding.xml.in | 3 +- interface-definitions/flow-accounting-conf.xml.in | 6 ++-- interface-definitions/high-availability.xml.in | 9 ++--- interface-definitions/https.xml.in | 3 +- .../include/bgp/neighbor-update-source.xml.i | 3 +- .../include/bgp/protocol-common-config.xml.i | 3 +- .../include/ipsec/local-address.xml.i | 3 +- .../include/ipsec/remote-address.xml.i | 3 +- .../include/listen-address-single.xml.i | 3 +- .../include/listen-address-vrf.xml.i | 3 +- interface-definitions/include/listen-address.xml.i | 3 +- .../include/name-server-ipv4-ipv6-port.xml.i | 3 +- .../include/name-server-ipv4-ipv6.xml.i | 3 +- .../include/radius-server-ipv4-ipv6.xml.i | 3 +- .../include/static/static-route-bfd.xml.i | 41 +++++++++++----------- interface-definitions/interfaces-openvpn.xml.in | 3 +- interface-definitions/ntp.xml.in | 3 +- interface-definitions/policy.xml.in | 6 ++-- interface-definitions/protocols-bfd.xml.in | 6 ++-- interface-definitions/protocols-rpki.xml.in | 3 +- interface-definitions/service-upnp.xml.in | 3 +- interface-definitions/snmp.xml.in | 9 ++--- interface-definitions/system-config-mgmt.xml.in | 3 +- interface-definitions/system-sflow.xml.in | 6 ++-- 26 files changed, 53 insertions(+), 87 deletions(-) diff --git a/interface-definitions/container.xml.in b/interface-definitions/container.xml.in index 9b6d2369d..6651fc642 100644 --- a/interface-definitions/container.xml.in +++ b/interface-definitions/container.xml.in @@ -201,8 +201,7 @@ IPv6 address - - + diff --git a/interface-definitions/dns-domain-name.xml.in b/interface-definitions/dns-domain-name.xml.in index e93c49ebd..9eb1a208f 100644 --- a/interface-definitions/dns-domain-name.xml.in +++ b/interface-definitions/dns-domain-name.xml.in @@ -23,8 +23,7 @@ - - + #include diff --git a/interface-definitions/dns-forwarding.xml.in b/interface-definitions/dns-forwarding.xml.in index de6991e06..ced1c9c31 100644 --- a/interface-definitions/dns-forwarding.xml.in +++ b/interface-definitions/dns-forwarding.xml.in @@ -670,8 +670,7 @@ - - + 0.0.0.0 :: diff --git a/interface-definitions/flow-accounting-conf.xml.in b/interface-definitions/flow-accounting-conf.xml.in index 878566b3f..40a9bb423 100644 --- a/interface-definitions/flow-accounting-conf.xml.in +++ b/interface-definitions/flow-accounting-conf.xml.in @@ -230,8 +230,7 @@ IPv6 server to export NetFlow - - + @@ -408,8 +407,7 @@ IPv6 server to export sFlow - - + diff --git a/interface-definitions/high-availability.xml.in b/interface-definitions/high-availability.xml.in index 94253def3..c5e46ed38 100644 --- a/interface-definitions/high-availability.xml.in +++ b/interface-definitions/high-availability.xml.in @@ -129,8 +129,7 @@ IPv6 ping target address - - + @@ -156,8 +155,7 @@ IPv6 hello source address - - + @@ -173,8 +171,7 @@ IPv6 unicast peer address - - + diff --git a/interface-definitions/https.xml.in b/interface-definitions/https.xml.in index cf30ab2be..5430193b5 100644 --- a/interface-definitions/https.xml.in +++ b/interface-definitions/https.xml.in @@ -36,8 +36,7 @@ any - - + \* diff --git a/interface-definitions/include/bgp/neighbor-update-source.xml.i b/interface-definitions/include/bgp/neighbor-update-source.xml.i index c6aa776c2..92e817166 100644 --- a/interface-definitions/include/bgp/neighbor-update-source.xml.i +++ b/interface-definitions/include/bgp/neighbor-update-source.xml.i @@ -20,8 +20,7 @@ Interface as route source - - + #include diff --git a/interface-definitions/include/bgp/protocol-common-config.xml.i b/interface-definitions/include/bgp/protocol-common-config.xml.i index 527eaf991..2d36f7de6 100644 --- a/interface-definitions/include/bgp/protocol-common-config.xml.i +++ b/interface-definitions/include/bgp/protocol-common-config.xml.i @@ -940,8 +940,7 @@ Interface name - - + #include diff --git a/interface-definitions/include/ipsec/local-address.xml.i b/interface-definitions/include/ipsec/local-address.xml.i index 9d267f3f7..71f514950 100644 --- a/interface-definitions/include/ipsec/local-address.xml.i +++ b/interface-definitions/include/ipsec/local-address.xml.i @@ -19,8 +19,7 @@ Allow any IPv4 address present on the system to be used for VPN - - + (any) diff --git a/interface-definitions/include/ipsec/remote-address.xml.i b/interface-definitions/include/ipsec/remote-address.xml.i index ba96290d0..91decba3c 100644 --- a/interface-definitions/include/ipsec/remote-address.xml.i +++ b/interface-definitions/include/ipsec/remote-address.xml.i @@ -19,8 +19,7 @@ Allow any IP address of the remote peer - - + (any) diff --git a/interface-definitions/include/listen-address-single.xml.i b/interface-definitions/include/listen-address-single.xml.i index 30293b338..6cc5aef0a 100644 --- a/interface-definitions/include/listen-address-single.xml.i +++ b/interface-definitions/include/listen-address-single.xml.i @@ -14,8 +14,7 @@ IPv6 address to listen for incoming connections - - + diff --git a/interface-definitions/include/listen-address-vrf.xml.i b/interface-definitions/include/listen-address-vrf.xml.i index 8c2bdce70..23ecc2476 100644 --- a/interface-definitions/include/listen-address-vrf.xml.i +++ b/interface-definitions/include/listen-address-vrf.xml.i @@ -14,8 +14,7 @@ IPv6 address to listen for incoming connections - - + diff --git a/interface-definitions/include/listen-address.xml.i b/interface-definitions/include/listen-address.xml.i index 48003dbf2..2454f43ff 100644 --- a/interface-definitions/include/listen-address.xml.i +++ b/interface-definitions/include/listen-address.xml.i @@ -15,8 +15,7 @@ - - + diff --git a/interface-definitions/include/name-server-ipv4-ipv6-port.xml.i b/interface-definitions/include/name-server-ipv4-ipv6-port.xml.i index fb0a4f4ae..b326a6537 100644 --- a/interface-definitions/include/name-server-ipv4-ipv6-port.xml.i +++ b/interface-definitions/include/name-server-ipv4-ipv6-port.xml.i @@ -11,8 +11,7 @@ Domain Name Server (DNS) IPv6 address - - + diff --git a/interface-definitions/include/name-server-ipv4-ipv6.xml.i b/interface-definitions/include/name-server-ipv4-ipv6.xml.i index 14973234b..cf483e5d9 100644 --- a/interface-definitions/include/name-server-ipv4-ipv6.xml.i +++ b/interface-definitions/include/name-server-ipv4-ipv6.xml.i @@ -11,8 +11,7 @@ Domain Name Server (DNS) IPv6 address - - + diff --git a/interface-definitions/include/radius-server-ipv4-ipv6.xml.i b/interface-definitions/include/radius-server-ipv4-ipv6.xml.i index c593512b4..efd418bb2 100644 --- a/interface-definitions/include/radius-server-ipv4-ipv6.xml.i +++ b/interface-definitions/include/radius-server-ipv4-ipv6.xml.i @@ -16,8 +16,7 @@ RADIUS server IPv6 address - - + diff --git a/interface-definitions/include/static/static-route-bfd.xml.i b/interface-definitions/include/static/static-route-bfd.xml.i index a05a08d12..d588b369f 100644 --- a/interface-definitions/include/static/static-route-bfd.xml.i +++ b/interface-definitions/include/static/static-route-bfd.xml.i @@ -10,28 +10,27 @@ Use BFD multi hop session - - - Use source for BFD session - - ipv4 - IPv4 source address - - - ipv6 - IPv6 source address - - - - - - - - #include - - + + + Use source for BFD session + + ipv4 + IPv4 source address + + + ipv6 + IPv6 source address + + + + + + + #include + + - \ No newline at end of file + diff --git a/interface-definitions/interfaces-openvpn.xml.in b/interface-definitions/interfaces-openvpn.xml.in index cf0ff497c..4e061c3e6 100644 --- a/interface-definitions/interfaces-openvpn.xml.in +++ b/interface-definitions/interfaces-openvpn.xml.in @@ -333,8 +333,7 @@ Remote end IPv6 address - - + diff --git a/interface-definitions/ntp.xml.in b/interface-definitions/ntp.xml.in index 558204a06..2275dd61c 100644 --- a/interface-definitions/ntp.xml.in +++ b/interface-definitions/ntp.xml.in @@ -25,8 +25,7 @@ Fully qualified domain name of NTP server - - + diff --git a/interface-definitions/policy.xml.in b/interface-definitions/policy.xml.in index 02828c4f6..aa39950c2 100644 --- a/interface-definitions/policy.xml.in +++ b/interface-definitions/policy.xml.in @@ -966,8 +966,7 @@ Peer IPv6 address - - + @@ -1533,8 +1532,7 @@ IPv6 address - - + diff --git a/interface-definitions/protocols-bfd.xml.in b/interface-definitions/protocols-bfd.xml.in index edbac8d0e..9048cf5c2 100644 --- a/interface-definitions/protocols-bfd.xml.in +++ b/interface-definitions/protocols-bfd.xml.in @@ -21,8 +21,7 @@ BFD peer IPv6 address - - + @@ -48,8 +47,7 @@ Local IPv6 address used to connect to the peer - - + diff --git a/interface-definitions/protocols-rpki.xml.in b/interface-definitions/protocols-rpki.xml.in index c41fa54f2..e9fd04b5f 100644 --- a/interface-definitions/protocols-rpki.xml.in +++ b/interface-definitions/protocols-rpki.xml.in @@ -23,8 +23,7 @@ Fully qualified domain name of RPKI server - - + diff --git a/interface-definitions/service-upnp.xml.in b/interface-definitions/service-upnp.xml.in index 1b2e00d91..20e01bfbd 100644 --- a/interface-definitions/service-upnp.xml.in +++ b/interface-definitions/service-upnp.xml.in @@ -120,9 +120,8 @@ #include - + - diff --git a/interface-definitions/snmp.xml.in b/interface-definitions/snmp.xml.in index 6527cabd6..0851b8389 100644 --- a/interface-definitions/snmp.xml.in +++ b/interface-definitions/snmp.xml.in @@ -94,8 +94,7 @@ IPv6 address to listen for incoming SNMP requests - - + @@ -166,8 +165,7 @@ IPv6 address - - + @@ -183,8 +181,7 @@ IPv6 address - - + diff --git a/interface-definitions/system-config-mgmt.xml.in b/interface-definitions/system-config-mgmt.xml.in index 716332d2a..de5a8cc16 100644 --- a/interface-definitions/system-config-mgmt.xml.in +++ b/interface-definitions/system-config-mgmt.xml.in @@ -30,8 +30,7 @@ Source address or interface for archive server connections - - + #include diff --git a/interface-definitions/system-sflow.xml.in b/interface-definitions/system-sflow.xml.in index 9c748c24a..c5152abe9 100644 --- a/interface-definitions/system-sflow.xml.in +++ b/interface-definitions/system-sflow.xml.in @@ -25,8 +25,7 @@ sFlow IPv6 agent address - - + @@ -97,8 +96,7 @@ IPv6 server to export sFlow - - + -- cgit v1.2.3 From 97f8933e7bf8bbc14f3176e0b86adb3e1d7cc424 Mon Sep 17 00:00:00 2001 From: Indrajit Raychaudhuri Date: Tue, 16 May 2023 20:54:44 -0500 Subject: T5226: Make host-name constraints to consistent everywhere Make host-name constraints consistent across all definitions --- interface-definitions/dns-domain-name.xml.in | 4 ++-- interface-definitions/include/interface/dhcp-options.xml.i | 4 ++++ interface-definitions/vpn-l2tp.xml.in | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/interface-definitions/dns-domain-name.xml.in b/interface-definitions/dns-domain-name.xml.in index 9eb1a208f..ef34ecbf5 100644 --- a/interface-definitions/dns-domain-name.xml.in +++ b/interface-definitions/dns-domain-name.xml.in @@ -73,9 +73,9 @@ Host name for static address mapping - [A-Za-z0-9][-.A-Za-z0-9]*[A-Za-z0-9] + #include - invalid hostname + Host-name must be alphanumeric and can contain hyphens diff --git a/interface-definitions/include/interface/dhcp-options.xml.i b/interface-definitions/include/interface/dhcp-options.xml.i index 2ed5fd403..8027769ff 100644 --- a/interface-definitions/include/interface/dhcp-options.xml.i +++ b/interface-definitions/include/interface/dhcp-options.xml.i @@ -12,6 +12,10 @@ Override system host-name sent to DHCP server + + #include + + Host-name must be alphanumeric and can contain hyphens diff --git a/interface-definitions/vpn-l2tp.xml.in b/interface-definitions/vpn-l2tp.xml.in index ec186cd23..ee0edc3e3 100644 --- a/interface-definitions/vpn-l2tp.xml.in +++ b/interface-definitions/vpn-l2tp.xml.in @@ -38,8 +38,9 @@ Sent to the client (LAC) in the Host-Name attribute - [A-Za-z0-9][-.A-Za-z0-9]*[A-Za-z0-9] + #include + Host-name must be alphanumeric and can contain hyphens -- cgit v1.2.3 From b6e780e05893c92e6bc36bdc452c31cf94673719 Mon Sep 17 00:00:00 2001 From: Indrajit Raychaudhuri Date: Tue, 16 May 2023 20:56:24 -0500 Subject: T5226: Fix typo in XML include headers --- .../include/constraint/alpha-numeric-hyphen-underscore.xml.i | 2 +- interface-definitions/include/constraint/host-name.xml.i | 2 +- .../include/constraint/interface-name-with-wildcard.xml.i | 2 +- interface-definitions/include/constraint/interface-name.xml.i | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/interface-definitions/include/constraint/alpha-numeric-hyphen-underscore.xml.i b/interface-definitions/include/constraint/alpha-numeric-hyphen-underscore.xml.i index eb568d7d9..ba097c6b5 100644 --- a/interface-definitions/include/constraint/alpha-numeric-hyphen-underscore.xml.i +++ b/interface-definitions/include/constraint/alpha-numeric-hyphen-underscore.xml.i @@ -1,3 +1,3 @@ - + [-_a-zA-Z0-9]+ diff --git a/interface-definitions/include/constraint/host-name.xml.i b/interface-definitions/include/constraint/host-name.xml.i index 202c200f4..cc9740c16 100644 --- a/interface-definitions/include/constraint/host-name.xml.i +++ b/interface-definitions/include/constraint/host-name.xml.i @@ -1,3 +1,3 @@ - + [A-Za-z0-9][-.A-Za-z0-9]*[A-Za-z0-9] diff --git a/interface-definitions/include/constraint/interface-name-with-wildcard.xml.i b/interface-definitions/include/constraint/interface-name-with-wildcard.xml.i index 09867b380..adff530b6 100644 --- a/interface-definitions/include/constraint/interface-name-with-wildcard.xml.i +++ b/interface-definitions/include/constraint/interface-name-with-wildcard.xml.i @@ -1,4 +1,4 @@ - + (bond|br|dum|en|ersp|eth|gnv|ifb|lan|l2tp|l2tpeth|macsec|peth|ppp|pppoe|pptp|sstp|tun|veth|vti|vtun|vxlan|wg|wlan|wwan)([0-9]?)(\*?)(.+)?|lo diff --git a/interface-definitions/include/constraint/interface-name.xml.i b/interface-definitions/include/constraint/interface-name.xml.i index e540e4418..1b14eabf5 100644 --- a/interface-definitions/include/constraint/interface-name.xml.i +++ b/interface-definitions/include/constraint/interface-name.xml.i @@ -1,4 +1,4 @@ - + (bond|br|dum|en|ersp|eth|gnv|ifb|lan|l2tp|l2tpeth|macsec|peth|ppp|pppoe|pptp|sstp|tun|veth|vti|vtun|vxlan|wg|wlan|wwan)[0-9]+(.\d+)?|lo -- cgit v1.2.3