While reviewing the codebase, I noticed the protocol emulators (coap_pit.c, telnet_pit.c, etc.)
lack robust error handling, which is critical for a production tarpit system.
Current issues identified:
- No validation of command-line parameters (port, delay, max clients)
- Missing errno details in error messages
- No handling of specific error cases (EPIPE, ECONNRESET)
- No socket options (SO_REUSEADDR, SO_KEEPALIVE)
- IP address conversion without bounds checking
Proposed changes for coap_pit.c (as a starting point):
- Add parameter validation
- Improve socket creation error messages
- Add sendto()/recvfrom() error checking
- Handle malloc failures gracefully
Why this matters:
Better error handling means:
- Easier debugging when things go wrong
- More reliable tarpit operation
- Better metrics for the Grafana dashboard
I'd like to work on this if the maintainers agree it's valuable.
While reviewing the codebase, I noticed the protocol emulators (coap_pit.c, telnet_pit.c, etc.)
lack robust error handling, which is critical for a production tarpit system.
Current issues identified:
Proposed changes for coap_pit.c (as a starting point):
Why this matters:
Better error handling means:
I'd like to work on this if the maintainers agree it's valuable.