any port before the connection is considered a flood and failed.
* Increase as needed, but should never need to be be over 512 bytes */
#define SCANBUFFER 128
+
+/* Max data to read from any port before closing the connection
+ * (to avoid flood attempts)
+ */
+#define MAXREAD 4096
#endif /* OPTIONS_H */
continue;
}
/* Avoid freezing from reading endless data */
- if(conn->datasize >= SCANBUFFER)
+ if(conn->bytes_read >= MAXREAD)
{
conn->state = STATE_CLOSED;
return;