[Click] Should IP6Address(IPAddress) actually construct IPv4 Mapped address?
Eddie Kohler
ekohler at gmail.com
Thu Mar 29 12:19:56 EDT 2012
Hi Markku,
On 3/27/12 3:11 AM, Markku Savela wrote:
> Hi again,
>
> The constructor IP6Address(IPAddress) just zeroes IPv6 address and puts
> the IPv4 on lower 4 octets (the result is called "IPv4 compatible
> address", use of which is deprecated -- see RFC-4291 2.5.5.1).
>
> Would it break anything if this constructor actually created
> an usable address using "IPv4 mapped address" - RFC-4291 2.5.5.2)?
Interesting. I don't know whether it would break anything; my guess is
it would not. In our main tree only ProtocolTranslator46 uses that
constructor. In the packages, ip6_natpt does rely on the constructor.
If asked again I will make that change.
However:
>
> Especially, when the function "IP6Address::ip4_address" returns true
> only for ipv4-mapped address.
THIS is not true. ip4_address() returns true for both ipv4-mapped and
ipv4-compatible addresses. I have added a test to verify this.
Eddie
>
> [Sorry about just sending these mails without actual patch proposals,
> but I may eventually get into that too in a bit.. ]
>
> _______________________________________________
> click mailing list
> click at amsterdam.lcs.mit.edu
> https://amsterdam.lcs.mit.edu/mailman/listinfo/click
More information about the click
mailing list