Ticket #1767 (closed task: fixed)

Opened 22 months ago

Last modified 12 months ago

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

ipv6.patch_server Download (37.0 KB) - added by wuma 22 months ago.
ipv6_fusion.patch Download (3.2 KB) - added by wuma 22 months ago.
ipv6_server.2.patch Download (42.2 KB) - added by wuma 22 months ago.
Added 2 more internal APIs:
ipv6_server.patch Download (42.2 KB) - added by wuma 22 months 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 Download (0.8 KB) - added by wuma 22 months 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

Change History

Changed 22 months ago by wuma

Changed 22 months ago by wuma

in reply to: ↑ description   Changed 22 months ago by wuma

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 4. 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 5. 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. 6. 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. 7. To make QuickPlot? work with IPv6, 2 MgMapBase? methods are exposed as Web API: - void MgMapBase::SetDisplayDpi?(int) - STRING MgMapBase::GetBackgroundColor?() 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) 8. Updated QuickPlot? to use RenderingService::RenderMap?() to generate the map image. 9. Misc: - Removed a wrong compiler predirective for ServerAdminService?: #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

Changed 22 months ago by wuma

Added 2 more internal APIs:

Changed 22 months ago by wuma

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

  Changed 22 months ago by wuma

  • status changed from new to closed
  • resolution set to fixed

  Changed 22 months ago by wuma

  • status changed from closed to reopened
  • resolution fixed deleted

Changed 22 months ago by wuma

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

  Changed 12 months ago by jng

  • status changed from reopened to closed
  • resolution set to fixed

Implemented

Note: See TracTickets for help on using tickets.