add IPv6 support (fate #314804)

Inconsistent spacing around operators. Spaces should be used around `=`, `!=`.