0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 09:41:54 +00:00

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; 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; return 1;
} }