[Asterisk-Dev] ENUM Lookup REGEXP Size

Andy Paumann andy at internic.at
Thu Aug 11 01:26:39 MST 2005


Hi there again,
 
Just for being complete J
 
There are 3 other places in ENUM.C which should be changed to 256 from 80. (Just to make sure). Just do a search and replace…
 
 
 
 
mit freundlichen Grüssen / with best regards
 
Andreas Paumann
 
CEO internic Datenkommunikations GmbH.
CEO globedom Datenkommunikations GmbH.
Donaucitystr. 1, A-1220 Vienna, Austria
Web: http://www.internic.at/ and http://www.globedom.com/
 
Why driving a 4WD? 'Cause the earth ain't flat!
-----Original Message-----
From: asterisk-dev-bounces at lists.digium.com [mailto:asterisk-dev-bounces at lists.digium.com] On Behalf Of Andy Paumann
Sent: Mittwoch, 10. August 2005 17:46
To: asterisk-dev at lists.digium.com
Subject: [Asterisk-Dev] ENUM Lookup REGEXP Size
 
Hi!
 
I have explored a problem, when having big regular expressions (using Asterisk CVS and stable versions):
 
The expressions where cut after 80 characters.
 
I have change the file enum.c to allow bigger REGEXPs…
 
 
Original version:
===========================================================================================
/*--- parse_naptr: Parse DNS NAPTR record used in ENUM ---*/
static int parse_naptr(unsigned char *dst, int dstsize, char *tech, int techsize, unsigned char *answer, int len, char *napt
rinput)
{
        unsigned char *oanswer = answer;
        unsigned char flags[80] = "";
        unsigned char services[80] = "";
        unsigned char regexp[80] = "";
        unsigned char repl[80] = "";
        unsigned char temp[80] = "";
        unsigned char delim;
        unsigned char *delim2;
        unsigned char *pattern, *subst, *d;
        int res;
        int regexp_len, size, backref;
        int d_len = sizeof(temp) - 1;
        regex_t preg;
        regmatch_t pmatch[9];
 
===========================================================================================
 
 
Changed version: 
===========================================================================================
 
 
/*--- parse_naptr: Parse DNS NAPTR record used in ENUM ---*/
static int parse_naptr(unsigned char *dst, int dstsize, char *tech, int techsize, unsigned char *answer, int len, char *napt
rinput)
{
        unsigned char *oanswer = answer;
        unsigned char flags[256] = "";
        unsigned char services[256] = "";
        unsigned char regexp[256] = "";
        unsigned char repl[256] = "";
        unsigned char temp[256] = "";
        unsigned char delim;
        unsigned char *delim2;
        unsigned char *pattern, *subst, *d;
        int res;
        int regexp_len, size, backref;
        int d_len = sizeof(temp) - 1;
        regex_t preg;
        regmatch_t pmatch[9];
 
===========================================================================================
 
Now it works…but the main problem is, that there are many customers out there, using Asterisk with the limit of 80 characters…is there a plan to change this limitation, as 80 sounds a little bit too low to me (There is only a limit for the UDP Packet of the Nameserver query itself, which (as I think) is around 512 bytes)?
 
mit freundlichen Grüssen / with best regards
 
Andreas Paumann
 
CEO internic Datenkommunikations GmbH.
CEO globedom Datenkommunikations GmbH.
Donaucitystr. 1, A-1220 Vienna, Austria
Web: http://www.internic.at/ and http://www.globedom.com/
 
Why driving a 4WD? 'Cause the earth ain't flat!
You can go fast…I can go everywhere!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20050811/e671cf1c/attachment.htm


More information about the asterisk-dev mailing list