Attention is currently required from: fixeria, msuraev. neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/29122 )
Change subject: Revert "Add function to guess AF_UNSPEC address" ......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1: Max, the difference is between detecting the address kind of a character string, vs detecting the address kind of a sockaddr_storage that has no AF set aka arbitrary binary data.
A character string is like "1.2.3.4" or "1:2:3::4" -- obviously you can detect the AF here.
If you have a struct sockaddr, you have arbitrary binary data, which is interpreted as IPv4 or IPv6 *completely depending* on the AF kind being set properly. There is otherwise absolutely no way to find the AF kind. You don't even know the actual size of the address data. AF_UNSPEC is unspecified, using it is an error, period. Pau already explained that in CR, too.
I am positive that you will be unable to prove to us that this function is useful in any way. If you wrote a test for this function, you should see.
Please remove your -1 vote.