[sr-dev] git:sr_3.0: domain: Do not report errors when domain cannot be extracted from URI.

Jan Janak jan at ryngle.com
Mon Oct 26 14:37:59 CET 2009


Module: sip-router
Branch: sr_3.0
Commit: 6186194a7e6153871d9da019e64916f6f73ec922
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6186194a7e6153871d9da019e64916f6f73ec922

Author: Jan Janak <jan at ryngle.com>
Committer: Jan Janak <jan at ryngle.com>
Date:   Mon Oct 26 14:37:22 2009 +0100

domain: Do not report errors when domain cannot be extracted from URI.

We should not report an error to syslog when lookup_domain fails to
parse the URI it was given as argument. That URI usually comes from
SIP messages we received from another implementation and we cannot
guarantee that they will always be well-formed. Generating an error
each time we receive a malformed SIP message can easily result in
denial of service.

---

 modules_s/domain/domain_mod.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules_s/domain/domain_mod.c b/modules_s/domain/domain_mod.c
index e5d5cb0..b175ff8 100644
--- a/modules_s/domain/domain_mod.c
+++ b/modules_s/domain/domain_mod.c
@@ -440,7 +440,7 @@ static int lookup_domain(struct sip_msg* msg, char* flags, char* fp)
 	track = 0;
 
 	if (get_str_fparam(&domain, msg, (fparam_t*)fp) != 0) {
-		ERR("Cannot get domain name to lookup\n");
+		DBG("lookup_domain: Cannot get the domain name to lookup\n");
 		return -1;
 	}
 




More information about the sr-dev mailing list