confd: yang: Put some limits on custom mac addresses

Not correct MAC address for example multicast bit set,
caused `ip` to exit with failure code, resulting in
that configuration was not applied.
This commit is contained in:
Mattias Walström
2026-05-17 18:27:45 +02:00
parent ed6171f920
commit 48a1df4c67
4 changed files with 14 additions and 4 deletions
+1
View File
@@ -18,6 +18,7 @@ All notable changes to the project are documented in this file.
- Handle unclean daemon exits better, e.g., `dbus-daemon` crashing and
leaving a stale pidfile behind, causing it to refuse to be restarted
- Fix occasional blank or garbled `[ OK ]` lines at startup
- Disallow multicast MAC addresses in custom MAC address configuration
[v26.04.0][] - 2026-04-30
-------------------------
+1 -1
View File
@@ -47,7 +47,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@2026-04-29.yang -e vlan-filtering"
"infix-interfaces@2026-05-13.yang -e vlan-filtering"
"ietf-crypto-types -e cleartext-symmetric-keys"
"infix-crypto-types@2026-02-14.yang"
"ietf-keystore -e symmetric-keys"
+12 -3
View File
@@ -41,6 +41,11 @@ module infix-interfaces {
contact "kernelkit@googlegroups.com";
description "Linux bridge and lag extensions for ietf-interfaces.";
revision 2026-05-13 {
description "Add limitations on custom mac addresses on interfaces, now needs to be a correct unicast mac-address";
reference "internal";
}
revision 2026-04-29 {
description "Add operational state for multicast router ports per bridge.";
reference "internal";
@@ -235,8 +240,12 @@ module infix-interfaces {
case static {
leaf static {
description "Statically configured interface address on protocol sub-layer, e.g., MAC.";
type yang:phys-address;
description "Statically configured unicast MAC address.";
type yang:mac-address {
pattern '[0-9a-fA-F][02468aAcCeE]:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}:[0-9a-fA-F]{2}' {
error-message "Must be a unicast MAC address (multicast bit must not be set).";
}
}
}
}
@@ -247,7 +256,7 @@ module infix-interfaces {
leaf offset {
description "Static offset added to the chassis MAC address.";
type yang:phys-address;
type yang:mac-address;
}
}
}