Attention is currently required from: msuraev, dexter.
Patch set 7:Code-Review -2
1 comment:
File src/sockaddr_str.c:
Patch Set #7, Line 389: guess = (src->ss_family == AF_UNSPEC) ? osmo_sockaddr_guess_unspec((const struct sockaddr *)src) : src->ss_family;
This all looks wrong to me, or I'm missing soemthing.
So you have a sockaddr_storage, which has size enough to contain whatever. Let's say it has ss_family=AF_UNSPEC; so you call osmo_sockaddr_guess_unspec() on it.
Then, osmo_sockaddr_guess_unspec() calls osmo_sockaddr_str_from_in6_addr() on it, which should convert fine no matter the random contents in the struct, since any possible value is acceptable in there.
So you end up handling AD_UNSPEC as AF_INET6, printing random stuff which may not be correct.
To view, visit change 28995. To unsubscribe, or for help writing mail filters, visit settings.