Subject: Re: IPv4-mapped IPv6 IP bind()ing problems...
To: icmps <icmp@icmps.org>
From: Martin Husemann <martin@duskware.de>
List: tech-net
Date: 03/07/2003 14:18:17
On Fri, Mar 07, 2003 at 07:51:02AM -0500, icmps wrote:

> $ ./test
> test:  yes
> test: bind=-1: Can't assign requested address
> test: connect=-1: Connection refused
> 
> the yes just says the IN6_IS_ADDR_V4MAPPED(&var.sin6_addr) was true...

----------------------------
revision 1.22
date: 2000/05/29 00:03:18;  author: itojun;  state: Exp;  lines: +10 -2
disallow bind(2) with IPv4 mapped address for now.  port number check is
insufficient at this moment and we can bind(2) two sockets listen on same
port number.

for real fix, we need to check inpcb table with in6pcb.  we can't
find inpcb chain from particular in6pcb chain (like finding tcbtable from tcb6)
luckily RFC2553 does not talk about bind(2) behavior for IPv4 mapped.
IPv4 mapped brings in too much complexities...
=============================================================================

So: since RFC2553 does not require us to allow binding in this case, we don't
support it.

Martin