[SR-Users] ip address fields
Daniel-Constantin Mierla
miconda at gmail.com
Mon Oct 22 20:38:24 CEST 2012
On 10/22/12 8:19 PM, Juha Heinanen wrote:
> Olle E. Johansson writes:
>
>> It's hard to judge the max length of IPv6, since there are many
>> notations. With IPv4 embedded IPv6 the text is expanded. With scoped
>> addresses where the interface name is added, it grows again.
> ipv6 is even bigger mesh than what i ever thought.
>
> as i wrote, there is the canonical rfc. why to support all kind of
> custom formats?
>
> to me it makes sense to store addresses only in canonical format to
> database in order to make sure that address comparison can be made
> uniquely.
ipv6 addresses can be safely compared only in binary format, never as
text representation -- in config you can use ipops module.
As long as a format is valid, it is pretty much a bug not supporting it.
Otherwise why not requiring binary value in storage...
On the other hand, I see no drawback in having varchar(50) or
varchar(60) -- the stored value does not take a longer byte than needed
in database and, at least for address, comparison is done in memory.
Cheers,
Daniel
--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - http://asipto.com/u/kat
Kamailio Advanced Training, Miami, USA, Nov 12-14, 2012 - http://asipto.com/u/katu
More information about the sr-users
mailing list