Add error messages if address types mismatch
commit544abd789eebfafa0bb3f250f6a824e808e32122
authorKarsten Keil <kkeil@suse.de>
Fri, 1 Aug 2008 14:31:06 +0000 (1 16:31 +0200)
committerH. Peter Anvin <hpa@zytor.com>
Fri, 1 Aug 2008 15:24:16 +0000 (1 08:24 -0700)
tree31e409b6caf8574113e04794ecbb1bf0f02e273a
parent18fd18bd5c101b787acfb764b44415651ab5eba4
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>
tftpd/tftpd.c