tech-net archive

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

Re: sctp & ipv4-mapped ipv6 fix



In article <20160215152102.GA2988@pris>,
Tyler Retzlaff  <rtr%netbsd.org@localhost> wrote:
>-=-=-=-=-=-
>
>hi,
>
>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.

Go for it.

christos



Home | Main Index | Thread Index | Old Index