Bugzilla – Attachment 34001 Details for
Bug 13252
SIP2 server should accept IPv6 connections
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Supplementary patch
0001-Bug-13252-Allow-for-IPv6-formatted-addresses-in-Port.patch (text/plain), 1.53 KB, created by
Colin Campbell
on 2014-11-27 16:29:56 UTC
(
hide
)
Description:
Supplementary patch
Filename:
MIME Type:
Creator:
Colin Campbell
Created:
2014-11-27 16:29:56 UTC
Size:
1.53 KB
patch
obsolete
>From a4a6ac5f93ea14e6dc30b13d8d499c3a49663cf9 Mon Sep 17 00:00:00 2001 >From: Colin Campbell <colin.campbell@ptfs-europe.com> >Date: Thu, 27 Nov 2014 16:07:23 +0000 >Subject: [PATCH] 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 >--- > C4/SIP/Sip/Configuration.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/C4/SIP/Sip/Configuration.pm b/C4/SIP/Sip/Configuration.pm >index 9a281dd..a584469 100644 >--- a/C4/SIP/Sip/Configuration.pm >+++ b/C4/SIP/Sip/Configuration.pm >@@ -71,7 +71,7 @@ sub accounts { > sub find_service { > my ($self, $sockaddr, $port, $proto) = @_; > my $portstr; >- foreach my $addr ('', '*:', "$sockaddr:") { >+ foreach my $addr ('', '*:', "$sockaddr:", "[$sockaddr]:") { > $portstr = sprintf("%s%s/%s", $addr, $port, lc $proto); > Sys::Syslog::syslog("LOG_DEBUG", "Configuration::find_service: Trying $portstr"); > last if (exists(($self->{listeners})->{$portstr})); >-- >1.9.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 13252
:
33530
|
33611
|
34001
|
34726
|
34727