The link address could be either IPv4 or IPv6 address. But the length of the original string value is different.
leaf link-address {
type binary {
length "0..16";
}
description "An address that may be used by the server to identify the link on which the client is located.";
}
Balaji Pachaiamalai
Below link convey binary length calculation is done with origin string value rather than base64 encoded string value.
https://yumaworks.freshdesk.com/support/solutions/articles/1000280753-how-to-work-with-bits-data-type-
The link address could be either IPv4 or IPv6 address. But the length of the original string value is different.