fixed missing 'else if' for ipv6