Welcome KAME hack link local addresses have lot of zeros abuse the zeros to carry the scope ID s6_addr[2] and s6_addr[3] carry the scope using such IPs on other socket calls will fail horribly routed to a black hole userland is responsible the fiddle the scope id in and out struct sockaddr_in6 sa_in6; if (IN6_IS_ADDR_LINKLOCAL(&sa_in6.sin6_addr) || IN6_IS_ADDR_MC_LINKLOCAL(&sa_in6.sin6_addr)) { memcpy(&tmp16, &sa_in6.sin6_addr.s6_addr[2], sizeof(tmp16)); sa_in6.sin6_scope_id = ntohs(tmp16); sa_in6.sin6_addr.s6_addr[2] = 0; sa_in6.sin6_addr.s6_addr[3] = 0; }