Bug #568
Ipv6 support
Status: | New | Start: | 02/25/2011 | |
Priority: | Normal | Due date: | ||
Assigned to: | - | % Done: | 0% |
|
Category: | - | Spent time: | - | |
Target version: | - | |||
Votes: | 0 |
Description
I found two ipv6 bugs.
1. URI exception in SocketListener.EndAccept
Problem line:
Uri uri = new Uri("tcp://" + endpoint.Address.ToString() + ':' + endpoint.Port);
It will raise exception "Invalid URI: A port was expected because of there is a colon (':') ..... "
Because ipv6 uses ":" to seperate each section, it violates the uri name rule.
This line should like this for ipv6 usage.
uri = new Uri("tcp://[" + endpoint.Address.ToString() + "]:" + endpoint.Port);
2. Ipv6 listening in SocketListener.Start
problem line:
listener = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
This line only initializes an ipv4 listening socket.