From: Ralph Ronnquist Date: Wed, 7 Oct 2020 12:14:09 +0000 (+1100) Subject: add log line for oddly small ignored packets X-Git-Tag: 0.3.2~9 X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;h=db050452004748cc1e92f1ec5e378a4df2f770ad;p=rrq%2Frrqnet.git add log line for oddly small ignored packets --- diff --git a/rrqnet.c b/rrqnet.c index ba5bb58..85f609e 100644 --- a/rrqnet.c +++ b/rrqnet.c @@ -271,7 +271,7 @@ static char *inet_nmtoa(unsigned char *b,int w) { b[8], b[9], b[10], b[11], b[12], b[13], b[14], b[15] ); } else { - VERBOSE3OUT( "HEX data of %d bytes\n", i ); + VERBOSE3OUT( "HEX data of %d bytes\n", w ); for ( ; i < w && i < 19000; i++, p += 3 ) { sprintf( p, "%02x:", b[i] ); } @@ -995,9 +995,13 @@ static struct Interface *input_check( r = add_remote( src, a ); //r->rec_when = now; // Set activity stamp of new remote } - if ( len <= 12 ) { + if ( len < 12 ) { // Ignore short data, but maintain channel r->rec_when = now; // Update activity stamp touched remote + if ( len > 0 ) { + VERBOSEOUT( "Ignoring %ld bytes from %s\n", + len, inet_stoa( src ) ); + } return 0; } // Now decrypt the data as needed