]> git.puffer.fish Git - matthieu/frr.git/commitdiff
yang: lib: interface MTUs can be larger than uint16
authorChristian Hopps <chopps@labn.net>
Sun, 14 Jan 2024 12:35:00 +0000 (12:35 +0000)
committerChristian Hopps <chopps@labn.net>
Sun, 14 Jan 2024 12:38:25 +0000 (12:38 +0000)
Technically changing a leaf from uint16 to uint32 is a NBC change; however,
increasing this to uint32 should not break anyone in reality.

Signed-off-by: Christian Hopps <chopps@labn.net>
lib/if.c
yang/frr-interface.yang

index a68f7f21e1cf167cfe7d1121f917a78d313091d7..1328e21874a163386cb5410f51d19a3527daef9f 100644 (file)
--- a/lib/if.c
+++ b/lib/if.c
@@ -1677,7 +1677,7 @@ lib_interface_state_mtu_get_elem(struct nb_cb_get_elem_args *args)
 {
        const struct interface *ifp = args->list_entry;
 
-       return yang_data_new_uint16(args->xpath, ifp->mtu);
+       return yang_data_new_uint32(args->xpath, ifp->mtu);
 }
 
 /*
index 012c96b6007bf8941c792f7cff871c587595294e..fc5a29090876503c4d10a1f2a92df3d0f0d8b11d 100644 (file)
@@ -241,17 +241,18 @@ module frr-interface {
     }
 
     leaf mtu {
-      type uint16;
+      type uint32;
       description
-        "The size of the largest IPV4 packet that the interface
-         will send and receive.";
+        "The size of the largest IPV4 packet that the interface will send.
+         Normally this will never be larger than 65535; however, some devices
+         (e.g., vrf) can have larger values";
     }
 
     leaf mtu6 {
       type uint32;
       description
         "The size of the largest IPV6 packet that the interface
-         will send and receive.";
+         will send.";
     }
 
     leaf speed {