[PATCH] Write log message on discarded packet

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The following patch writes a log message when a packet is discarded due
to mismatched UDP source address.

This log message would have saved me two days of debugging wondering
where my packets were going.


Index: pjmedia/src/pjmedia/transport_udp.c
===================================================================
--- pjmedia/src/pjmedia/transport_udp.c	(revision 4883)
+++ pjmedia/src/pjmedia/transport_udp.c	(working copy)
@@ -483,6 +483,8 @@
 		udp->rtp_src_cnt++;
 
 		if (udp->rtp_src_cnt < PJMEDIA_RTP_NAT_PROBATION_CNT) {
+		    PJ_LOG(4, (udp->base.name,
+			      "Discarded packet from unexpected source address"));
 		    discard = PJ_TRUE;
 		} else {
 		



[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux