Module: kamailio
Branch: master
Commit: dd4dc5361ae97b743c202360723df3cacac3259f
URL: 
https://github.com/kamailio/kamailio/commit/dd4dc5361ae97b743c202360723df3cacac3259f

Author: Henning Westerholt <[email protected]>
Committer: Henning Westerholt <[email protected]>
Date: 2018-06-09T00:58:54+02:00

core: udp server - remove deactivated functionality from 2008, not valid anymore

Remove decaticated functionality related zero terminated SIP messages in UPD 
server.
15 years ago this was a bug, but now with binary payloads its not valid anymore.
No change in functionality.

---

Modified: src/core/udp_server.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/dd4dc5361ae97b743c202360723df3cacac3259f.diff
Patch: 
https://github.com/kamailio/kamailio/commit/dd4dc5361ae97b743c202360723df3cacac3259f.patch

---

diff --git a/src/core/udp_server.c b/src/core/udp_server.c
index def3ac1861..862bed174d 100644
--- a/src/core/udp_server.c
+++ b/src/core/udp_server.c
@@ -515,19 +515,6 @@ int udp_rcv_loop()
                                continue;
                        }
                }
-/* historically, zero-terminated packets indicated a bug in clients
- * that calculated wrongly packet length and included string-terminating
- * zero; today clients exist with legitimate binary payloads and we
- * shall not check for zero-terminated payloads
- */
-#ifdef TRASH_ZEROTERMINATED_PACKETS
-               if (buf[len-1]==0) {
-                       tmp=ip_addr2a(&ri.src_ip);
-                       LM_WARN("upstream bug - 0-terminated packet from %s 
%d\n",
-                                       tmp, htons(ri.src_port));
-                       len--;
-               }
-#endif
 #endif
 #ifdef DBG_MSG_QA
                if (!dbg_msg_qa(buf, len)) {


_______________________________________________
Kamailio (SER) - Development Mailing List
[email protected]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to