]> git.proxmox.com Git - mirror_frr.git/commitdiff
yang: fix cisco access list source value
authorIgor Ryzhov <iryzhov@nfware.com>
Fri, 27 Nov 2020 18:53:25 +0000 (21:53 +0300)
committerIgor Ryzhov <iryzhov@nfware.com>
Fri, 27 Nov 2020 18:53:25 +0000 (21:53 +0300)
Source value must be a choice between host, network and any, not a set
of all three.

Fixes #7599.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
yang/frr-filter.yang

index 400a09317895377f585b8d5a52689630bb2264a1..eb84dd746083d03f5eaf8cab71d3ae065e232f7f 100644 (file)
@@ -154,29 +154,33 @@ module frr-filter {
                 }
               }
               case cisco {
-                leaf host {
-                  description "Host to match";
-                  type inet:ipv4-address;
-                }
-                container network {
-                  leaf address {
-                    mandatory true;
-                    description "Network address part.";
+                choice standard-value {
+                  description "Source value to match";
+
+                  leaf host {
+                    description "Host to match";
                     type inet:ipv4-address;
                   }
-                  leaf mask {
-                    mandatory true;
-                    description "Network mask/wildcard part.";
-                    type inet:ipv4-address;
+                  container network {
+                    leaf address {
+                      mandatory true;
+                      description "Network address part.";
+                      type inet:ipv4-address;
+                    }
+                    leaf mask {
+                      mandatory true;
+                      description "Network mask/wildcard part.";
+                      type inet:ipv4-address;
+                    }
+                  }
+                  leaf source-any {
+                    /*
+                     * Was `any`, however it conflicts with `any` leaf
+                     * outside this choice.
+                     */
+                    description "Match any";
+                    type empty;
                   }
-                }
-                leaf source-any {
-                  /*
-                   * Was `any`, however it conflicts with `any` leaf
-                   * outside this choice.
-                   */
-                  description "Match any";
-                  type empty;
                 }
 
                 choice extended-value {