Browse code

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 authored on 18/01/2004 04:25:13
Showing 2 changed files
... ...
@@ -191,5 +191,9 @@
191 191
 #define VERSION_COLUMN "version"
192 192
 #define TABLENAME_COLUMN "table_name"
193 193
 
194
+/* minimum packet size; smaller packets will be dropped silently */
195
+#define MIN_UDP_PACKET        32
196
+
197
+
194 198
 
195 199
 #endif
... ...
@@ -330,7 +330,7 @@ int udp_rcv_loop()
330 330
 		buf[len]=0; /* no need to save the previous char */
331 331
 
332 332
 #ifndef NO_ZERO_CHECKS
333
-		if (len<5) {
333
+		if (len<MIN_UDP_PACKET) {
334 334
 			DBG("DEBUG: probing packet received\n");
335 335
 			continue;
336 336
 		}