tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: sctp & ipv4-mapped ipv6 fix



Tyler Retzlaff wrote:
>the attached patch converts sctp to use in6_sin_2_v4mapsin6().
>
>it was kept separate from the previous patch posted since the existing
>sctp code seems to be building the mapped address incorrectly.
>
>(hoping to get confirmation here)
>
>the existing code seems to set the incorrect parts of the sin6.sin6_addr
>structure (uses the wrong s6_addr offsets).
>
>(1) s6_addr16[2] = 0xffff
>(2) bcopy(&sin->sin_addr, &sin6.sin6_addr.s6_addr16[3],
>        sizeof(sin6.sin6_addr.s6_addr16[3]));
>
>using in6_sin_2_v4mapsin6() should resolve this.

Looking at RFC 4291, I would agree that it is using the wrong offsets.

I confess that I had not tried building sctp without INET6 until now,
it doesn't compile at present.

I guess that if all the calls to in6_sin_2_v4mapsin6() were inside
#ifdef INET6 conditional code then adding a reference to netinet6
from netinet is ok.

Robert Swindells




Home | Main Index | Thread Index | Old Index