Opened 13 years ago

Closed 12 years ago

#1767 closed task (fixed)

Implement RFC 118 - Support IPv6

Reported by: wuma Owned by: Mars Wu
Priority: high Milestone:
Component: Server Version:
Severity: major Keywords:
Cc: External ID:

Description

This ticket is for implementing RFC 118 - Support IPv6

Attachments (5)

ipv6.patch_server (37.0 KB ) - added by wuma 13 years ago.
ipv6_fusion.patch (3.2 KB ) - added by wuma 13 years ago.
ipv6_server.2.patch (42.2 KB ) - added by wuma 13 years ago.
Added 2 more internal APIs:
ipv6_server.patch (42.2 KB ) - added by wuma 13 years ago.
If the ACE_HAS_IPV6 is defined in config.h, then it's not effective on Linux. So move the definition to the begining of config-win32.h and config-linux.h
ipv6_cleanup.patch (869 bytes ) - added by wuma 13 years ago.
1. ServerInformation::CheckAddress will treat : as an invalid charactor for an IP address. After IPv6 is implemented, it's not true. So remove the : from the invalid characters list 2. Clean up: bool isv6Address = address.find(L":") != -1 changed -1 to wstring::npos

Download all attachments as: .zip

Change History (9)

by wuma, 13 years ago

Attachment: ipv6.patch_server added

by wuma, 13 years ago

Attachment: ipv6_fusion.patch added

in reply to:  description comment:1 by wuma, 13 years ago

Replying to wuma:

This ticket is for implementing RFC 118 - Support IPv6

This change list implements IPv6 support for IM Server.

  1. Enabled IPv6 for ACE
  2. Changed the IP validation logic to consider IPv6.
  3. Changed the IP comparison logic to consider IPv6.
  4. Added a new internal function to determine if a given IP address is in v4 format
  5. Made Server listen to different address according to the MachineIp parameter in

serverconfig.ini. If the the MachineIp parameter is empty or IPv4 format, Server will listen to 0.0.0.0 so that it could listen to all available IPv4 addresses of the server machine. And if the MachineIp parameter is in IPv6 format, Server will listen to :: so that it could listen to all available IPv6 addresses of the server machine

  1. Changed the way how to encode the site server's ip address. Previsously the site server

address was encoded to session id by converting the IPv4 numbers to be hex numbers. For IPv6, this approach is not applicable because IPv6 format is too complicated and has non-number separators. The new approach is: encode the ip address to be base64 string.

  1. There was logic in Ajax viewer to validate the session id (in php, aspx and jsp).

Updated the regular expression pattern to adapt to the new sessionid format.

  1. To make QuickPlot work with IPv6, 2 MgMapBase methods are exposed as Web API:

Previously QuickPlot uses HTTP API to get the map image. The mapagent URL is conposed at runtime and has "127.0.0.1" explicitly as the host name. It is to make the server gernerated URL could work with PHP + Apache when calling the php function imagecreatefrompng(url)

  1. Updated QuickPlot to use RenderingService::RenderMap() to generate the map image.
  2. Misc:

#define _WIN32_WINNT 0x0400 This predirective will make the compiler always think the OS is very old (win9x) and use the wrong library to compile soket related code. It will make couple project fail to compile after ACE_HAS_IPV6 has been enabled for ACE. That macro should be maintained by windows SDK by detecting the OS version. So removed it

by wuma, 13 years ago

Attachment: ipv6_server.2.patch added

Added 2 more internal APIs:

by wuma, 13 years ago

Attachment: ipv6_server.patch added

If the ACE_HAS_IPV6 is defined in config.h, then it's not effective on Linux. So move the definition to the begining of config-win32.h and config-linux.h

comment:2 by wuma, 13 years ago

Resolution: fixed
Status: newclosed

comment:3 by wuma, 13 years ago

Resolution: fixed
Status: closedreopened

by wuma, 13 years ago

Attachment: ipv6_cleanup.patch added
  1. ServerInformation::CheckAddress will treat : as an invalid charactor for an IP address. After IPv6 is implemented, it's not true. So remove the : from the invalid characters list 2. Clean up: bool isv6Address = address.find(L":") != -1 changed -1 to wstring::npos

comment:4 by jng, 12 years ago

Resolution: fixed
Status: reopenedclosed

Implemented

Note: See TracTickets for help on using tickets.