>> you have wrong length set in sa_len. >OK, and the right length is? correct ones are like: sizeof(struct sockaddr) sizeof(struct sockaddr_in) sizeof(struct sockaddr_in6) you are (wrongly) using sizeof(struct in_addr) sizeof(struct in6_addr) and alike. itojun