wiki:MapGuideRfc118

Version 2 (modified by wuma, 13 years ago) ( diff )

--

MapGuide RFC 118 - Support IPv6

This page contains a change request (RFC) for the MapGuide Open Source project. More MapGuide RFCs can be found on the RFCs page.

Status

RFC Template Version(1.0)
Submission Date04 July 2011
Last Modified04 July 2011
AuthorMars Wu
RFC Statusdraft
Implementation Statuspending
Proposed Milestone2.3
Assigned PSC guide(s)Bruce Dechant
Voting History(vote date)
+1
+0
-0
-1
no vote

Overview

This RFC proposes a solution to make MGOS work with both IPv4 and IPv6.

Motivation

IPv6 is the trend of network. Supporting IPv6 will be a must-have for MGOS in the future.

Proposed Solution

To make MGOS support IPv6, couple things need be done:

  1. Enable IPv6 for ACE.

ACE supports both IPv4 and IPv6. But by default, ACE is compiled without IPv6 support. To change this, one compiler predriective should be defined:

#define ACE_HAS_IPV6

It should be defined in config.h so that it could be effective for both Windows and Linux

  1. Port the IP address validation logic.

There is existing logic to validate if the IP address specified in the configuration file is valid. But the logic always assumes the IP address is in v4 format. We need port the logic to consider both v4 format and v6 format. One example is like below in in \Common\MapGuideCommon\Util\IpUtil.cpp.

void MgIpUtil::ValidateAddress(CREFSTRING address, bool strict)
{
...

    if (STRING::npos != address.rfind(L':'))
    {
        MgStringCollection arguments;
        arguments.Add(L"1");
        arguments.Add(address);

        MgStringCollection whyArguments;
        whyArguments.Add(L":");

        throw new MgInvalidArgumentException(L"MgIpUtil.ValidateAddress",
            __LINE__, __WFILE__, &arguments,
            L"MgStringContainsReservedCharacters", &whyArguments);
    }
...
}

It treats the character : as invalid. But for IPv6, : is used as a splitter for the address segments.

Implications

Test Plan

Funding / Resources

Autodesk supplied.

Note: See TracWiki for help on using the wiki.