Commit 13741548 authored by Ondřej Filip's avatar Ondřej Filip

Some better lsa checking added.

parent a9c41c85
......@@ -251,6 +251,16 @@ ospf_lsupd_rx(struct ospf_lsupd_packet *ps, struct proto *p,
{
struct ospf_lsa_header lsatmp;
struct top_hash_entry *lsadb;
u16 lenn;
lenn=ntohs(lsa->length);
if((lenn<=sizeof(struct ospf_lsa_header))||(lenn!=(4*(lenn/4))))
{
log("Received LSA with bad length\n");
ospf_neigh_sm(n,INM_BADLSREQ);
break;
}
/* pg 143 (1) */
if(lsa->checksum!=lsasum_check(lsa,NULL,po))
{
......
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