Do not allow to configure a loopback interface in multiple areas

This commit is contained in:
Mattias Walström
2024-10-03 07:28:33 +02:00
parent b88c3c3a0c
commit 673ce2767f
3 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ MODULES=(
"ieee802-dot1q-types@2022-10-29.yang"
"infix-ip@2024-09-16.yang"
"infix-if-type@2024-01-29.yang"
"infix-routing@2024-09-23.yang"
"infix-routing@2024-10-01.yang"
"ieee802-dot1ab-lldp@2022-03-15.yang"
"infix-lldp@2023-08-23.yang"
"infix-dhcp-client@2024-09-20.yang"
+5 -1
View File
@@ -26,6 +26,10 @@ module infix-routing {
contact "kernelkit@googlegroups.com";
description "Deviations and augments for ietf-routing and ietf-ospf.";
revision 2024-10-01 {
description "Remove possibility to have loopack in multiple areas.";
reference "internal";
}
revision 2024-09-23 {
description "Augment static routes with optional route-preference (distance).";
reference "internal";
@@ -272,7 +276,7 @@ module infix-routing {
}
deviation "/rt:routing/rt:control-plane-protocols/rt:control-plane-protocol/ospf:ospf/ospf:areas/ospf:area/ospf:interfaces/ospf:interface" {
deviate add {
must "current()/name = 'lo' or count(../../../../ospf:areas/ospf:area/ospf:interfaces/ospf:interface[ospf:name=current()/name]) <= 1" {
must "count(../../../../ospf:areas/ospf:area/ospf:interfaces/ospf:interface[ospf:name=current()/name]) <= 1" {
error-message "Only one area per interface is allowed.";
}
}