typedef on plugin's type does not call the right plugin callbacks
Hi.
typedef listen-ipv6-address {
type inet:ipv6-address-no-zone;
default "::0";
}
If i try to store a value in a leaf of type inet:ipv6-address, the plugin callback lyplg_type_store_ipv6_address_no_zone() is correctly called in order to store the value correctly.
This actually helps in handling the different ways we could define an IPv6 address (for example, "::0" and and "0.0.0.0.0.0.0.0" are actually the same).
But if i try to store a value in a leaf of type listen-ipv6-address, the plugin callback lyplg_type_store_string() is called instead.
As the base type is "inet:ipv6-address-no-zone", shouldn't it call lyplg_type_store_ipv6_address_no_zone() as in the first case ?
Even if i were to remove the default "::0"; part, we would end up with a simple alias, but we would still lose the functionalities provided by the ipv6-address-no-zone type plugin.
can this be changed?
I just proposed a simple fix for this issue. It's actually similar to what is done here : https://github.com/CESNET/libyang/blob/b282fb6a24272294119b1400505aaacea5ae3cfc/src/schema_compile_node.c#L2143
I hope it helps :)