aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2024-05-22 11:00:01 +0200
committerLuca Deri <deri@ntop.org>2024-05-22 11:00:01 +0200
commit5a25f89ab364078dd1478f56da4d3e2154784f1a (patch)
treee1a026afaf22a2a0cdd6d10acdf8e5c56753c71c /src
parentfd02baa13ae35ce01f334f5c79fa0d6884c4f131 (diff)
Enlarged buffer
Diffstat (limited to 'src')
-rw-r--r--src/lib/ndpi_main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c
index 4d0647704..d7eb5c282 100644
--- a/src/lib/ndpi_main.c
+++ b/src/lib/ndpi_main.c
@@ -2728,7 +2728,7 @@ static ndpi_patricia_node_t* add_to_ptree(ndpi_patricia_tree_t *tree, int family
int ndpi_load_ptree_file(ndpi_ptree_t *ptree,
const char *path,
u_int16_t protocol_id) {
- char buffer[128], *line, *addr, *cidr, *saveptr;
+ char buffer[1024], *line, *addr, *cidr, *saveptr;
FILE *fd;
int len;
u_int num_loaded = 0;
@@ -2767,7 +2767,8 @@ int ndpi_load_ptree_file(ndpi_ptree_t *ptree,
struct in_addr addr4;
addr4.s_addr = inet_addr(addr);
-
+
+ /* printf("+ %s/%d\n", addr, cidr ? atoi(cidr) : 32); */
node = add_to_ptree(ptree->v4, AF_INET, &addr4, cidr ? atoi(cidr) : 32 /* bits */);
} else {
struct in6_addr addr6;