[Freeswitch-dev] Fwd: mod_enum and ordering / prefference
jaybinks at gmail.com
Thu Nov 13 11:34:42 MSK 2014
so both http://tools.ietf.org/html/rfc2915 &
say the the client MUST do the ordering.
Interesting to note is that http://tools.ietf.org/html/draft-daniel-naptr-00
talks about the client randomly selecting if order & pref are all the same.
however the RFC does not explicitly mention this for NAPR. ( which is a
little unfortunate )
---------- Forwarded message ----------
From: jay binks <jaybinks at gmail.com>
Date: 13 November 2014 17:40
Subject: mod_enum and ordering / prefference
To: freeswitch-dev at lists.freeswitch.org
So im looking over mod_enum in relation to something Im trying to do ( will
discuss later in the email ), and after looking through the code, it seems
the mod_enum does not order the results at all, and it is assumed that ldns
or the DNS server will order the results correctly.
ldns_resolver_query is called, and parse_naptr is called for each result.
parse_naptr parses the result row then calls add_result, which adds it to
the array of enum_record.
( appears to always add it to the end )
Its not that this is failing for me, but this seems to be a little
dangerous and I would have expected FS to interpret the order and
preference values its self.
Can someone else take a look over this for me, and tell me if im wrong. :)
In addition to this, I was hoping to find a way to make FS randomly
select a row if the order & preference are identical.
Obviously this would need to be a config value because some people may NOT
want this, but can anyone see any issues here ?? if the order / pref are
identical your already going to run the risk of something jumbling the
order around so you cant rely on the order of your zone file... having FS
randomise this simple means that it will defiantly be random :)
just after some thoughts on this one...
( if you happen to decide to patch the above issue... then consider this
also... otherwise ill attempt a patch for both depending on feedback )
-------------- next part --------------
An HTML attachment was scrubbed...
Join us at ClueCon 2014 Aug 4-7, 2014
More information about the FreeSWITCH-dev