summaryrefslogtreecommitdiff
path: root/ospfd
diff options
context:
space:
mode:
authorThomas Ries <tries@gmx.net>2011-10-27 17:43:38 +0400
committerDenis Ovsienko <infrastation@yandex.ru>2011-11-15 21:22:50 +0400
commit70e3ca2ccedca2cae58bd91c968714cad0f9d5d6 (patch)
treed0590a9b6e9c1f5c79987b3f9724935f9a55ebe3 /ospfd
parentf85bab1482b0db4cfdf90a2fd50f42d6dae96b42 (diff)
ospfd: improve fix to CVE-2011-3326 (BZ#586)
Make ospf_flood() propagate error returned by ospf_lsa_install() further to properly discard the malformed LSA, not just prevent the immediate crash.
Diffstat (limited to 'ospfd')
-rw-r--r--ospfd/ospf_flood.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ospfd/ospf_flood.c b/ospfd/ospf_flood.c
index fc0bbf12..f72087b5 100644
--- a/ospfd/ospf_flood.c
+++ b/ospfd/ospf_flood.c
@@ -320,7 +320,7 @@ ospf_flood (struct ospf *ospf, struct ospf_neighbor *nbr,
MinLSArrival seconds have elapsed. */
if (! (new = ospf_lsa_install (ospf, nbr->oi, new)))
- return 0; /* unknown LSA type */
+ return -1; /* unknown LSA type or any other error condition */
/* Acknowledge the receipt of the LSA by sending a Link State
Acknowledgment packet back out the receiving interface. */