[asterisk-bugs] [Asterisk 0010983]: Bad DNS lookups on ENUMLOOKUP - various problems

noreply at bugs.digium.com noreply at bugs.digium.com
Mon Oct 15 15:56:30 CDT 2007


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=10983 
====================================================================== 
Reported By:                jtodd
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   10983
Category:                   Functions/func_enum
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
Asterisk Version:            SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 85140 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             10-15-2007 12:54 CDT
Last Modified:              10-15-2007 15:56 CDT
====================================================================== 
Summary:                    Bad DNS lookups on ENUMLOOKUP - various problems
Description: 
1) ENUMLOOKUP apparently is doing an "A" record lookup on the domain in the
From: header.  Why is this?  It's bad, slow, and leaks information.  Should
not happen; no reason for it to happen.

2) Failures on ENUMLOOKUP on NAPTR records on ISN-style lookups.  The
lookups just outright fail, though the DNS returns the correct NAPTR back
to Asterisk.  Not sure if this is an ISN-style problem or if this is an
issue with all NAPTRs.

====================================================================== 

---------------------------------------------------------------------- 
 jamesgolovich - 10-15-07 15:56  
---------------------------------------------------------------------- 
Looking into the first issue, the A record lookups by chan_sip.c

Are these INVITEs coming from a device that doesn't have a peer setup on
the asterisk box?  If thats the case then the gethostbyname is happening in
sip_devicestate.  That's the only way I've been able to get chan_sip to do
a lookup on a hostname in the From field (there might be other ways, just
not that I have found)

I'm not really sure how to "fix" this, just wanted to point out whats
causing it.    If the names doesn't resolve then it returns INVALID and if
it does resolve then it returns UNKNOWN.

Maybe someone that knows more about the devicestate system can shed some
light on this 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
10-15-07 15:56  jamesgolovich  Note Added: 0072047                          
======================================================================




More information about the asterisk-bugs mailing list