Issues in rewriting server side (1/2) Port number space issues No clear definition e.g. relationship between the port space of TCP/IPv4 and the space of TCP/IPv6? Order of bind(2)? Take the safest route: getaddrinfo(AI_PASSIVE) issue bind(2) to all addresses exit if none of bind(2) succeed IPv6 wildcard bind RFC2553: allows an AF_INET6 socket to accept IPv4 packets. Do not rely on this - complicated specification, low portability. Source of security holes: loophole in access control rules. check ::ffff:1.2.3.4 as well as 1.2.3.4 SUMMARY: assume nothing