Bug 13252 Allow for IPv6 formatted addresses in Port definition
authorColin Campbell <colin.campbell@ptfs-europe.com>
Thu, 27 Nov 2014 16:07:23 +0000 (16:07 +0000)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Sun, 28 Dec 2014 23:46:44 +0000 (20:46 -0300)
commitee02bcb14f30a897c1e3eeac3933ba83dacf3abe
tree5ef4401d2e70bb913e2a9be51f2c0614e2b52ea9
parenta5c9947f4305b4a214741ff50345f486232dff56
Bug 13252 Allow for IPv6 formatted addresses in Port definition

The SIP config has allowed you to specify an interface ip as
part of the listeners/service/port attributei
 e. g.  as port="127.0.0.1:6001/tcp"
with IPv6 the equivalent would normally be
   as port="[::1]:5001/tcp"
However in this case incoming connections will get rejected because
Configuration constructs a string without the brackets
This patch makes tests both formats on incoming connections so that
they are accepted as they were previously

In future the best course is not to include a port identifier in the
port definition then if the server has ipv6 it will bind to all
interfaces and accept both IPv4 and IPv6 traffic

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
C4/SIP/Sip/Configuration.pm