Browse code

SER-324 fix: dont throw away terminating zero from payload

Jiri Kuthan authored on 23/01/2008 21:02:06
Showing 1 changed files
... ...
@@ -477,7 +477,12 @@ int udp_rcv_loop()
477 477
 #ifdef USE_STUN
478 478
 		}
479 479
 #endif
480
-#ifndef USE_STUN
480
+/* historically, zero-terminated packets indicated a bug in clients
481
+ * that calculated wrongly packet length and included string-terminating
482
+ * zero; today clients exist with legitimate binary payloads and we
483
+ * shall not check for zero-terminated payloads
484
+ */
485
+#ifdef TRASH_ZEROTERMINATED_PACKETS
481 486
 		if (buf[len-1]==0) {
482 487
 			tmp=ip_addr2a(&ri.src_ip);
483 488
 			LOG(L_WARN, "WARNING: udp_rcv_loop: "