diff options
author | Ondrej Filip <feela@network.cz> | 2005-03-14 11:07:10 +0000 |
---|---|---|
committer | Ondrej Filip <feela@network.cz> | 2005-03-14 11:07:10 +0000 |
commit | 427e59939bc72c79f1566167b337927b14cb1715 (patch) | |
tree | a28d033d750973394b5481a7278f18ddbb64955c /proto/ospf/packet.c | |
parent | a2d5b405d41c212993e47d47607df3b708254c97 (diff) |
Look for large packets.
Diffstat (limited to 'proto/ospf/packet.c')
-rw-r--r-- | proto/ospf/packet.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/proto/ospf/packet.c b/proto/ospf/packet.c index f06d3e0e..443efa06 100644 --- a/proto/ospf/packet.c +++ b/proto/ospf/packet.c @@ -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; } |