Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
1 parent
c52431b
commit ae2ee3d
Showing
4 changed files
with
44 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters