- else if (addr->type == IPV6_ADDRESS)
- {
- struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sa;
- sin6->sin6_family = AF_INET6;
- sin6->sin6_port = htons (port);
- /* #### How can ADDR be NULL? We have dereferenced it above by
- accessing addr->type! */
- if (addr == NULL)
- {
- sin6->sin6_addr = in6addr_any;
- /* #### Should we set the scope_id here? */
- }
- else
- {
- sin6->sin6_addr = ADDRESS_IPV6_IN6_ADDR (addr);
+ case IPV6_ADDRESS:
+ {
+ struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sa;
+ sin6->sin6_family = AF_INET6;
+ sin6->sin6_port = htons (port);
+ sin6->sin6_addr = ADDRESS_IPV6_IN6_ADDR (ip);