Attention is currently required from: fixeria, msuraev.
1 comment:
Patchset:
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.
To view, visit change 29122. To unsubscribe, or for help writing mail filters, visit settings.