Add error messages if address types mismatch
If a user does supply a IPv4 or IPv6 address
but force the other type with -4 or -6, give an error.
The patch also fix the special [::ffff:127.0.1]
address handling, it work now if you bind to this
address but only if you not force IPv6 only, it seems
that the kernel does not signal connections to a
IPv6 socket listen on [::ffff:127.0.0.1], if it was bound
IPv6 only.
I think we can live with it and do not need a special test
for this address.
Signed-off-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>