[Asterisk-code-review] pbx dundi: Added IPv6 support for dundi (asterisk[13])

Matthew Fredrickson asteriskteam at digium.com
Mon Dec 18 13:32:49 CST 2017


Matthew Fredrickson has posted comments on this change. ( https://gerrit.asterisk.org/6173 )

Change subject: pbx_dundi: Added IPv6 support for dundi
......................................................................


Patch Set 3: Code-Review-1

(1 comment)

> Hi Joshua,
 > 
 > In order to use netsock2, we would have had to change the address
 > structure to ast_sockaddr but as the original dundi implementation
 > that used ipv4 did not adopt it we decided not to change it. We
 > were trying to minimize the amount of code change, whilst adding
 > the ipv6 functionality to minimise the chance of introducing new
 > bugs to dundi.
 > 
 > As for your original two questions:
 > Q) "Is it possible for an IPv4 host to receive an IPv6 address? If
 > so for older versions what occurs?"
 > 
 > A) We copied the way IAX2 implemented the IPv6 interface - in this
 > scenario we would not expect two Asterisk servers that are
 > configured to talk together with DUNDi to be running a mixed fleet
 > of IPv4 and IPv6, you would simply choose one and make sure your
 > entire fleet of Asterisk servers are running the same version - as
 > a result we don't see any issue with it.
 > 
 > Q) "I don't think this works with IPv6 due to the scanning for :
 > which is present in IPv6 addresses"
 > 
 > A) We have not seen any issues with this implementation in more
 > than 6 months of trials with a significant number of servers. We
 > will remove the TODO statement as we beleive is not needed.
 > 
 > Have submitted a new patch set that removes this TODO statement.
 > 
 > Kind regards,
 > 
 > Adam

Hey Adam,

A few of the devs on IRC had a discussion, and came to the conclusion that in order to move forward with this code, the netsock2 conversion is a requirement.  Also, since there are no tests accompanying this change, it will need to be against the master branch as well.

Best wishes,
Matthew Fredrickson

https://gerrit.asterisk.org/#/c/6173/3/pbx/pbx_dundi.c
File pbx/pbx_dundi.c:

https://gerrit.asterisk.org/#/c/6173/3/pbx/pbx_dundi.c@1323
PS3, Line 1323: 			memcpy(&trans->addr.i6, &p->addr.i6, sizeof(struct sockaddr_in6));
Is this a bug?  Memcpy struct differences between ipv4 and ipv6.



-- 
To view, visit https://gerrit.asterisk.org/6173
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifbe298afc6416ba400db7be404a25994ad23968a
Gerrit-Change-Number: 6173
Gerrit-PatchSet: 3
Gerrit-Owner: Adam Secombe <adam.j.secombe at boeing.com>
Gerrit-Reviewer: Adam Secombe <adam.j.secombe at boeing.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matthew Fredrickson <creslin at digium.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
Gerrit-Comment-Date: Mon, 18 Dec 2017 19:32:49 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171218/a2bc0e88/attachment.html>


More information about the asterisk-code-review mailing list