Module: kamailio
Branch: 5.8
Commit: 50e69e9a269e5d5dba0251f893abc34907a12970
URL:
https://github.com/kamailio/kamailio/commit/50e69e9a269e5d5dba0251f893abc34…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2025-01-15T09:25:11+01:00
sanity: log as debug when Content-Length is missing for datagram protocols
- the header is optional for datagram protocols (RFC3261, 20.14)
(cherry picked from commit e38c7f8bac1aef9890d266fa466cea1561346732)
---
Modified: src/modules/sanity/sanity.c
---
Diff:
https://github.com/kamailio/kamailio/commit/50e69e9a269e5d5dba0251f893abc34…
Patch:
https://github.com/kamailio/kamailio/commit/50e69e9a269e5d5dba0251f893abc34…
---
diff --git a/src/modules/sanity/sanity.c b/src/modules/sanity/sanity.c
index fa3d0493883..44765f7a17f 100644
--- a/src/modules/sanity/sanity.c
+++ b/src/modules/sanity/sanity.c
@@ -625,7 +625,11 @@ int check_cl(sip_msg_t *msg)
}
LM_DBG("check_cl passed\n");
} else {
- LM_WARN("content length header missing in request\n");
+ if(msg->rcv.proto != PROTO_UDP && msg->rcv.proto != PROTO_SCTP) {
+ LM_WARN("content length header missing in request\n");
+ } else {
+ LM_DBG("content length header missing in request\n");
+ }
}
return SANITY_CHECK_PASSED;