]>
git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
common: fix segfault in public IPv6 addr picking
sockaddr is only 16 bytes big, so declaring net as sockaddr
and then casting to sockaddr_in6 in case of IPv6 cannot
work.
using sockaddr_storage works for both IPv4 and IPv6, and is
used in other code parts as well.
note that the tests did not find this issue as they declared
the bigger structs and casted the references to (sockaddr *)
Fixes: http://tracker.ceph.com/issues/19371
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>