Skip to content

Commit

Permalink
Merge pull request #15156 from LabNConsulting/chopps/yang-mtu-32
Browse files Browse the repository at this point in the history
yang: lib: interface MTUs can be larger than uint16
  • Loading branch information
ton31337 authored Jan 15, 2024
2 parents 563c2cd + c68246c commit bd9174f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/if.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/*
Expand Down
9 changes: 5 additions & 4 deletions yang/frr-interface.yang
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit bd9174f

Please sign in to comment.