Commit 427e5993 authored by Ondřej Filip's avatar Ondřej Filip

Look for large packets.

parent a2d5b405
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment