Since the introduction of IPv6 overlay, there is a structure to hold either IPv4 or IPv6. This currently is not always set properly to the right type and even when it is, it's really easy to forget to in the future.
It would be best to have some wrappers to enforce proper type to be set when setting the value.
There is also a problem with the fact that it is being stored as a union which can be initialized improperly.
And IPv6 data is stored as a plain uint8_t array, so proper overflow checks against the size of this array are not always easy to do.
Since the introduction of IPv6 overlay, there is a structure to hold either IPv4 or IPv6. This currently is not always set properly to the right type and even when it is, it's really easy to forget to in the future.
It would be best to have some wrappers to enforce proper type to be set when setting the value.
There is also a problem with the fact that it is being stored as a
union
which can be initialized improperly.And IPv6 data is stored as a plain
uint8_t
array, so proper overflow checks against the size of this array are not always easy to do.