Daniel-Constantin Mierla
2021-05-31 11:50:32 UTC
Content preview: Module: kamailio Branch: master Commit: b0bfe7afc52335774f8de8b31c19621f86fc4bc7
URL: https://github.com/kamailio/kamailio/commit/b0bfe7afc52335774f8de8b31c19621f86fc4bc7
Author: Daniel-Constantin Mierla <***@gmail.com> Committer: Daniel-Constantin
Mierla <***@gmail.com> Date: 2021-05-31T13:32:14+02:00
Content analysis details: (-2.4 points, 5.5 required)
pts rule name description
---- ---------------------- --------------------------------------------------
-1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP
-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
[score: 0.0000]
1.0 FORGED_GMAIL_RCVD 'From' gmail.com does not match 'Received'
headers
0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
provider (miconda[at]gmail.com)
0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level
mail domains are different
0.0 DKIM_ADSP_CUSTOM_MED No valid author signature, adsp_override is
CUSTOM_MED
0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and
EnvelopeFrom freemail headers are
different
-1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list
manager
Module: kamailio
Branch: master
Commit: b0bfe7afc52335774f8de8b31c19621f86fc4bc7
URL: https://github.com/kamailio/kamailio/commit/b0bfe7afc52335774f8de8b31c19621f86fc4bc7
Author: Daniel-Constantin Mierla <***@gmail.com>
Committer: Daniel-Constantin Mierla <***@gmail.com>
Date: 2021-05-31T13:32:14+02:00
core: store start of via body start in the structure
- paired with bsize field
---
Modified: src/core/parser/parse_via.c
Modified: src/core/parser/parse_via.h
Modified: src/core/sip_msg_clone.c
---
Diff: https://github.com/kamailio/kamailio/commit/b0bfe7afc52335774f8de8b31c19621f86fc4bc7.diff
Patch: https://github.com/kamailio/kamailio/commit/b0bfe7afc52335774f8de8b31c19621f86fc4bc7.patch
---
diff --git a/src/core/parser/parse_via.c b/src/core/parser/parse_via.c
index 8805fad5ca..78bd304f32 100644
--- a/src/core/parser/parse_via.c
+++ b/src/core/parser/parse_via.c
@@ -2667,6 +2667,7 @@ char *parse_via(
/*DBG("parse_via: rest=<%s>\n", tmp);*/
vb->error = PARSE_OK;
+ vb->bstart = buffer;
vb->bsize = tmp - buffer;
if(vb->port_str.s) {
vb->port = str2s(vb->port_str.s, vb->port_str.len, &err);
@@ -2680,6 +2681,7 @@ char *parse_via(
nextvia:
DBG("parsing via: next via\n");
vb->error = PARSE_OK;
+ vb->bstart = buffer;
vb->bsize = tmp - buffer;
if(vb->port_str.s) {
vb->port = str2s(vb->port_str.s, vb->port_str.len, &err);
diff --git a/src/core/parser/parse_via.h b/src/core/parser/parse_via.h
index e4957961f1..b4e99a09df 100644
--- a/src/core/parser/parse_via.h
+++ b/src/core/parser/parse_via.h
@@ -76,6 +76,7 @@ typedef struct via_body {
str port_str;
str params;
str comment;
+ char *bstart; /* body content, not including hdr */
int bsize; /* body size, not including hdr */
struct via_param* param_lst; /* list of parameters*/
struct via_param* last_param; /*last via parameter, internal use*/
diff --git a/src/core/sip_msg_clone.c b/src/core/sip_msg_clone.c
index e69c7f785d..f66614c99c 100644
--- a/src/core/sip_msg_clone.c
+++ b/src/core/sip_msg_clone.c
@@ -159,6 +159,8 @@ static inline struct via_body* via_body_cloner( char* new_buf,
/* hdr (str type) */
new_via->hdr.s=translate_pointer(new_buf,org_buf,org_via->hdr.s);
+ /* bstart (char* type) */
+ new_via->bstart=translate_pointer(new_buf,org_buf,org_via->bstart);
/* name (str type) */
new_via->name.s=translate_pointer(new_buf,org_buf,org_via->name.s);
/* version (str type) */
URL: https://github.com/kamailio/kamailio/commit/b0bfe7afc52335774f8de8b31c19621f86fc4bc7
Author: Daniel-Constantin Mierla <***@gmail.com> Committer: Daniel-Constantin
Mierla <***@gmail.com> Date: 2021-05-31T13:32:14+02:00
Content analysis details: (-2.4 points, 5.5 required)
pts rule name description
---- ---------------------- --------------------------------------------------
-1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP
-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
[score: 0.0000]
1.0 FORGED_GMAIL_RCVD 'From' gmail.com does not match 'Received'
headers
0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
provider (miconda[at]gmail.com)
0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level
mail domains are different
0.0 DKIM_ADSP_CUSTOM_MED No valid author signature, adsp_override is
CUSTOM_MED
0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and
EnvelopeFrom freemail headers are
different
-1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list
manager
Module: kamailio
Branch: master
Commit: b0bfe7afc52335774f8de8b31c19621f86fc4bc7
URL: https://github.com/kamailio/kamailio/commit/b0bfe7afc52335774f8de8b31c19621f86fc4bc7
Author: Daniel-Constantin Mierla <***@gmail.com>
Committer: Daniel-Constantin Mierla <***@gmail.com>
Date: 2021-05-31T13:32:14+02:00
core: store start of via body start in the structure
- paired with bsize field
---
Modified: src/core/parser/parse_via.c
Modified: src/core/parser/parse_via.h
Modified: src/core/sip_msg_clone.c
---
Diff: https://github.com/kamailio/kamailio/commit/b0bfe7afc52335774f8de8b31c19621f86fc4bc7.diff
Patch: https://github.com/kamailio/kamailio/commit/b0bfe7afc52335774f8de8b31c19621f86fc4bc7.patch
---
diff --git a/src/core/parser/parse_via.c b/src/core/parser/parse_via.c
index 8805fad5ca..78bd304f32 100644
--- a/src/core/parser/parse_via.c
+++ b/src/core/parser/parse_via.c
@@ -2667,6 +2667,7 @@ char *parse_via(
/*DBG("parse_via: rest=<%s>\n", tmp);*/
vb->error = PARSE_OK;
+ vb->bstart = buffer;
vb->bsize = tmp - buffer;
if(vb->port_str.s) {
vb->port = str2s(vb->port_str.s, vb->port_str.len, &err);
@@ -2680,6 +2681,7 @@ char *parse_via(
nextvia:
DBG("parsing via: next via\n");
vb->error = PARSE_OK;
+ vb->bstart = buffer;
vb->bsize = tmp - buffer;
if(vb->port_str.s) {
vb->port = str2s(vb->port_str.s, vb->port_str.len, &err);
diff --git a/src/core/parser/parse_via.h b/src/core/parser/parse_via.h
index e4957961f1..b4e99a09df 100644
--- a/src/core/parser/parse_via.h
+++ b/src/core/parser/parse_via.h
@@ -76,6 +76,7 @@ typedef struct via_body {
str port_str;
str params;
str comment;
+ char *bstart; /* body content, not including hdr */
int bsize; /* body size, not including hdr */
struct via_param* param_lst; /* list of parameters*/
struct via_param* last_param; /*last via parameter, internal use*/
diff --git a/src/core/sip_msg_clone.c b/src/core/sip_msg_clone.c
index e69c7f785d..f66614c99c 100644
--- a/src/core/sip_msg_clone.c
+++ b/src/core/sip_msg_clone.c
@@ -159,6 +159,8 @@ static inline struct via_body* via_body_cloner( char* new_buf,
/* hdr (str type) */
new_via->hdr.s=translate_pointer(new_buf,org_buf,org_via->hdr.s);
+ /* bstart (char* type) */
+ new_via->bstart=translate_pointer(new_buf,org_buf,org_via->bstart);
/* name (str type) */
new_via->name.s=translate_pointer(new_buf,org_buf,org_via->name.s);
/* version (str type) */