]> git.puffer.fish Git - mirror/frr.git/commitdiff
ospfd: improve fix to CVE-2011-3326 (BZ#586)
authorThomas Ries <tries@gmx.net>
Thu, 27 Oct 2011 13:43:38 +0000 (17:43 +0400)
committerDenis Ovsienko <infrastation@yandex.ru>
Tue, 15 Nov 2011 16:50:48 +0000 (20:50 +0400)
Make ospf_flood() propagate error returned by ospf_lsa_install() further
to properly discard the malformed LSA, not just prevent the immediate
crash.

ospfd/ospf_flood.c

index 004ed1a77ab667e9711c97c434fe1d2518a9bb75..2ebae89ac39c91c8ee865b6a8ba8d22ef804e47a 100644 (file)
@@ -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. */