[asterisk-dev] [Code Review] SIP URI comparison test (plus some bug fixes)

Olle E. Johansson oej at edvina.net
Wed Jul 21 04:56:37 CDT 2010


From
http://tools.ietf.org/html/draft-ietf-sip-ipv6-abnf-fix-05


"3.2.  Clarification for comparison of URIs with textual representation

      of IP addresses

   The resolution to this ambiguity is a simple clarification
   acknowledging that the textual representation of an IP addresses
   varies, but it is the binary equivalence of the IP address that must
   be taken into consideration when comparing two URIs that contain
   varying textual representations of an IP address."

"OLD:

   o  For two URIs to be equal, the user, password, host, and port
      components must match.

   NEW:

   o  For two URIs to be equal, the user, password, host, and port
      components must match.  If the host component contains a textual
      representation of IP addresses, then the representation of those
      IP addresses may vary.  If so, the host components are considered
      to match if the different textual representations yield the same
      binary IP address."

There's also an example of an IP address with a zero, but not bothering with the four digits, just noting that 
192.0.2.128 = 192.00.02.128, so the binary comparision applies to IPv4 as well.

/O





More information about the asterisk-dev mailing list