Miscellaneous Pitfalls (2) sockaddr_in6{} without sin6_scope_id glibc (>=2.2) does not allow this rather historic issue when we use linux-2.2.x clear sockaddr_in6{} first, get{sock,peer}name() and force length of sockaddr_in6{} when using getnameinfo() Copying sockaddr{} eg. application compiled without sockaddr_in6{} be careful, library may returns larger sockaddr_in6{}.