Some better lsa checking added.
This commit is contained in:
parent
a9c41c8548
commit
13741548a6
1 changed files with 10 additions and 0 deletions
|
@ -251,6 +251,16 @@ ospf_lsupd_rx(struct ospf_lsupd_packet *ps, struct proto *p,
|
||||||
{
|
{
|
||||||
struct ospf_lsa_header lsatmp;
|
struct ospf_lsa_header lsatmp;
|
||||||
struct top_hash_entry *lsadb;
|
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) */
|
/* pg 143 (1) */
|
||||||
if(lsa->checksum!=lsasum_check(lsa,NULL,po))
|
if(lsa->checksum!=lsasum_check(lsa,NULL,po))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue