From 749dc0c966918e559ddf3f64809b1824fbafcac7 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 27 Mar 2025 08:51:05 -0400 Subject: [PATCH] yang: Limit eigrp to just 1 instance per vrf Currently EIGRP has built in yang code that expects only 1 ASN used per vrf. Let's just limit the operator from putting themselves in a bad position by allowing something like this: router eigrp 33 .... ! router eigrp 99 ... ! no router eigrp 99 would crash because of assumptions made in the yang processing. Let's just hard code that assumption into the EIGRP yang at the moment such that it will not allow you to enter a `router eigrp 99` instance at all. This is purely a software limitation to prevent the code from violating it's current assumptions. I do not see much need to support this at this point in time so I fixed the problem this way instead of having to possibly touch a bunch of code. Signed-off-by: Donald Sharp --- yang/frr-eigrpd.yang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yang/frr-eigrpd.yang b/yang/frr-eigrpd.yang index 8f2ad5be46..931f5f6fee 100644 --- a/yang/frr-eigrpd.yang +++ b/yang/frr-eigrpd.yang @@ -112,7 +112,7 @@ module frr-eigrpd { list instance { key "asn vrf"; description "EIGRP autonomous system instance"; - + must "count(../instance[vrf =current()/vrf]) = 1"; leaf asn { type autonomous-system; description "Autonomous System Number"; -- 2.39.5