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:
parent
a2d5b405d4
commit
427e59939b
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user