mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-22 09:13:01 +02:00
confd: add validation of min/max interface name length
A sane interface name is at least two characters long, and in Linux the interface name (using ip link) is at most 15 characthers long. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -37,7 +37,7 @@ MODULES=(
|
||||
"ieee802-ethernet-interface@2019-06-21.yang"
|
||||
"infix-ethernet-interface@2024-02-27.yang"
|
||||
"infix-factory-default@2023-06-28.yang"
|
||||
"infix-interfaces@2024-10-28.yang -e vlan-filtering"
|
||||
"infix-interfaces@2024-11-12.yang -e vlan-filtering"
|
||||
|
||||
# from rousette
|
||||
"ietf-restconf@2017-01-26.yang"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- sh -*-
|
||||
# REMEMBER TO UPDATE infix-interfaces ALSO IN confd.inc
|
||||
MODULES=(
|
||||
"infix-interfaces@2024-10-28.yang -e vlan-filtering -e containers"
|
||||
"infix-interfaces@2024-11-12.yang -e vlan-filtering -e containers"
|
||||
"infix-containers@2024-10-14.yang"
|
||||
)
|
||||
|
||||
@@ -23,6 +23,11 @@ module infix-interfaces {
|
||||
contact "kernelkit@googlegroups.com";
|
||||
description "Linux bridge and lag extensions for ietf-interfaces.";
|
||||
|
||||
revision 2024-11-12 {
|
||||
description "Limit name 1-15 chars, Linux limitation.";
|
||||
reference "internal";
|
||||
}
|
||||
|
||||
revision 2024-10-28 {
|
||||
description "Limit description to 64 chars, matching IF-MIB max.";
|
||||
reference "internal";
|
||||
@@ -89,6 +94,14 @@ module infix-interfaces {
|
||||
}
|
||||
}
|
||||
|
||||
deviation "/if:interfaces/if:interface/if:name" {
|
||||
deviate replace {
|
||||
type string {
|
||||
length "1..15";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
deviation "/if:interfaces/if:interface/if:description" {
|
||||
deviate replace {
|
||||
type string {
|
||||
|
||||
Reference in New Issue
Block a user