ipp2p: remove log flooding

Syslog was flooded by lots of messages due to if (plen >= 5) firing
on any packet, when it should have been plen < 5. Incidentally, this
turned up that plen also takes on huge nonsense values, assuming
underflow - yet to be investigated.
This commit is contained in:
Jan Engelhardt
2009-01-10 04:46:26 +01:00
parent 019c9de291
commit 879e964f60

View File

@@ -603,8 +603,13 @@ search_all_kazaa(const unsigned char *payload, const unsigned int plen)
{
uint16_t c, end, rem;
if (plen >= 5) {
printk(KERN_WARNING KBUILD_MODNAME ": %s: plen (%u) < 5\n",
if (plen < 5)
/* too short for anything we test for - early bailout */
return 0;
if (plen >= 65535) {
/* Something seems _really_ fishy */
printk(KERN_WARNING KBUILD_MODNAME ": %s: plen (%u) >= 65535\n",
__func__, plen);
return 0;
}