Browse Source

limit for length of packets to be dropped raised (there was a guy flooding
our logs with keep-alive message "THIS IS A KEEP ALIVE"

Jiri Kuthan 21 năm trước cách đây
mục cha
commit
32d5444c55
2 tập tin đã thay đổi với 5 bổ sung1 xóa
  1. 4 0
      config.h
  2. 1 1
      udp_server.c

+ 4 - 0
config.h

@@ -191,5 +191,9 @@
 #define VERSION_COLUMN "version"
 #define TABLENAME_COLUMN "table_name"
 
+/* minimum packet size; smaller packets will be dropped silently */
+#define MIN_UDP_PACKET        32
+
+
 
 #endif

+ 1 - 1
udp_server.c

@@ -330,7 +330,7 @@ int udp_rcv_loop()
 		buf[len]=0; /* no need to save the previous char */
 
 #ifndef NO_ZERO_CHECKS
-		if (len<5) {
+		if (len<MIN_UDP_PACKET) {
 			DBG("DEBUG: probing packet received\n");
 			continue;
 		}