/* Sanity checks */
if (packetlen < SILC_PACKET_MIN_LEN) {
- SILC_LOG_DEBUG(("Received invalid packet, dropped"));
+ SILC_LOG_ERROR(("Received invalid packet, dropped"));
silc_buffer_clear(sock->inbuf);
return FALSE;
}
sock->type == SILC_SOCKET_TYPE_CLIENT ? "Client" :
sock->type == SILC_SOCKET_TYPE_SERVER ? "Server" :
"Router")));
+ return FALSE;
}
/* Pull the packet from inbuf thus we'll get the next one
if ((buffer->len - silc_hmac_len(hmac)) > SILC_PACKET_MIN_LEN) {
silc_buffer_push_tail(buffer, silc_hmac_len(hmac));
} else {
- SILC_LOG_DEBUG(("Bad MAC length in packet, packet dropped"));
+ SILC_LOG_ERROR(("Bad MAC length in packet, packet dropped"));
return FALSE;
}
}
if ((buffer->len - silc_hmac_len(hmac)) > SILC_PACKET_MIN_LEN) {
silc_buffer_push_tail(buffer, silc_hmac_len(hmac));
} else {
- SILC_LOG_DEBUG(("Bad MAC length in packet, packet dropped"));
+ SILC_LOG_ERROR(("Bad MAC length in packet, packet dropped"));
return FALSE;
}
}
silc_buffer_pull(buffer, SILC_PACKET_MIN_HEADER_LEN);
if (len > buffer->len) {
- SILC_LOG_DEBUG(("Garbage in header of packet, bad packet length, "
+ SILC_LOG_ERROR(("Garbage in header of packet, bad packet length, "
"packet dropped"));
return FALSE;
}