Look for large packets.
This commit is contained in:
parent
a2d5b405d4
commit
427e59939b
1 changed files with 3 additions and 2 deletions
|
@ -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 a new issue