1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

Minor fix in LSA update.

This commit is contained in:
Ondrej Zajicek
2009-12-03 18:25:14 +01:00
parent e4a810b0ce
commit 69fbf9a251
2 changed files with 5 additions and 4 deletions

View File

@@ -449,8 +449,9 @@ ospf_lsupd_receive(struct ospf_packet *ps_i, struct ospf_iface *ifa,
struct ospf_lsa_header *lsa = (void *) (((u8 *) ps) + offset);
unsigned int lsalen = ntohs(lsa->length);
if (((offset + lsalen) > size) || ((lsalen % 4) != 0) ||
offset += lsalen;
if ((offset > size) || ((lsalen % 4) != 0) ||
(lsalen <= sizeof(struct ospf_lsa_header)))
{
log(L_WARN "Received LSA from %I with bad length", n->ip);