Look for large packets.

This commit is contained in:
Ondrej Filip 2005-03-14 11:07:10 +00:00
parent a2d5b405d4
commit 427e59939b

View file

@ -292,9 +292,10 @@ ospf_rx_hook(sock * sk, int size)
return 1;
}
if ((unsigned) size > ifa->iface->mtu)
if (((unsigned) size > sk->rbsize) || (ntohs(ps->length) > sk->rbsize))
{
log(L_ERR "%s%I - received larger packet than MTU", mesg, sk->faddr);
log(L_ERR "%s%I - packet is too large (%d-%d vs %d)",
mesg, sk->faddr, size, ntohs(ps->length), sk->rbsize);
return 1;
}