header cleanup
fix ipv6 support