Don't treat a host:port string as a domain

The domain matching code prior to 1.8 used to manually remove the port
from the host:port string when determining if an incoming request
matched the list of domains. When switching to the new parsing
functions, the documentation implied that the "domain" was being
returned by these functions, when instead it was returning the
"hostport" as defined by RFC 3261. This led to confusion and resulted
in 1.8+ rejecting an incoming request from x.x.x.x:xxxxx when
domain=x.x.x.x was set in sip.conf.

This patch renames the "domain" variables in the parsing functions to
"hostport" to more accurately describe what it is that they are
returning and also properly truncates the resulting hostport strings
when dealing with domain matching.

Review: https://reviewboard.asterisk.org/r/1574/


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@344215 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Terry Wilson
2011-11-09 19:57:04 +00:00
parent 1aa6f26827
commit a2a11ee737
4 changed files with 136 additions and 114 deletions

View File

@@ -1725,7 +1725,7 @@ struct contact {
char *name;
char *user;
char *pass;
char *domain;
char *hostport;
struct uriparams params;
char *headers;
char *expires;