[SR-Users] PDB module long prefixes

Igor Potjevlesch igor.potjevlesch at gmail.com
Mon Dec 7 17:46:01 CET 2015


Hi,

I had configured my pdb module to accept 5 number prefixes by doing:

In pdbt.c:

bufsize = slen + 1 + 1 + *4* + 1 + 1; // line buff
er (telephone number + colon + white space + carrier ID + newline + \0)

...

 ret = snprintf(p,* 7*, "%d\n", node->carrier);
               if (ret < 1 || ret > *6*) {

And in common.h:

#define MAX_PDB_CARRIERID *99999*

And i hadn't had any problem until now. I had rows in my .csv like:

0645052050;10122

And it worked. The problem I have now is with prefixes bigger than 40000. I
get segmentation fault when doiong a query with pdbt, however the pdbt
build works good without any error.

At first i thought of a buffer problem but eventhough testing with a .csv
of 2 rows with 50000 prefixes will not work. Another curious effect is that
for a prefix like 84238 the server changes the answer to 18754. I dont know
why...

Could anyone help me please?

Thanks and regards,

Igor.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20151207/cfb912e5/attachment.html>


More information about the sr-users mailing list