[asterisk-dev] Configured IPv6 transport in endpoint being overwritten by IPv4

Joshua C. Colp jcolp at sangoma.com
Wed May 13 05:09:53 CDT 2020


On Wed, May 13, 2020 at 6:55 AM Roger James <roger at beardandsandals.co.uk>
wrote:

> I have an endpoint defined in the conf that has the 'transport' field set
> to a named ipv6 transport. I had this working on a test system. This
> required the application of the gerrit patch 14404 (currently in code
> review). I have moved this on to a more realistic test setup. This setup
> also has active ipv4 connections. As soon as one of these was successful
> it
> seems to have 'locked' the system into a persistent ipv4 only mode. I am
> afraid that is the best way I can describe it. I apologise in advance for
> the lack of precision. Even if the system is fully rebooted, very early on
> in the config process the transport field in the endpoint is changed to
> point at an ipv4 transport. I have spent a number of hours in gdb trying
> to
> pinpoint where this is happening, to no avail. The depths of sorcery have
> addled my ancient brain. Any assistance or pointers would be extremely
> gratefully received! In particular about where to put a breakpoint to trap
> this.
>

Does "pjsip show endpoint" continue to show the correct transport? If so,
then it's not in sorcery but outside of it somewhere. You're going to need
to clarify what this "persistent ipv4 only mode" actually means. For
example: I place a call to the endpoint with the transport set to IPv6 and
it results in IPv4 being used. If that's the case then you'd need to
specify what the URI is - if it is a hostname then you'd need to look at
the log messages from the resolver. If it's registered then the URI would
also need to be examined just in case. That will tell you, for example, if
the resolver was explicitly told to limit to IPv4 or not. If it wasn't and
it resulted in AAAA records then it would be further up the stack
somewhere. You'd also need to clarify what being successful means in the
context of an active IPv4 connection. Does that mean placing a call to it?
Finally you haven't specified UDP, TCP, or TLS.


>
> As an aside. It is educational to put a break point on the code in
> config.c
> that reads the config files. I have isolated the transport=my-ipv6 line
> into its own file, and made the break point conditional on that file name.
> It is triggered an unbelievable number of times. I cannot see the wood for
> the trees. It also seems very wasteful as somewhere way back up the stack
> it is going to be thrown away as "file unchanged". Isn't that what last
> modification times are for?
>

Without further context as to your specific deployment and usage, can't
really answer. I can say though that file modification times and such are
taken into account when reloading. If it's unchanged then it isn't reloaded.

-- 
Joshua C. Colp
Asterisk Technical Lead
Sangoma Technologies
Check us out at www.sangoma.com and www.asterisk.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20200513/7f37e32a/attachment.html>


More information about the asterisk-dev mailing list