]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Beware the NULL route, my son... The bugs that bite, the BIRDs that crash :-)
authorMartin Mares <mj@ucw.cz>
Tue, 20 Oct 1998 15:47:02 +0000 (15:47 +0000)
committerMartin Mares <mj@ucw.cz>
Tue, 20 Oct 1998 15:47:02 +0000 (15:47 +0000)
nest/rt-table.c

index 7ec40113f9cd2ba05e42be693f0635ec438fa54f..06ee1d3d647bd26ba5d98b56c82a13a3c4180c1d 100644 (file)
@@ -203,9 +203,12 @@ rte_update(net *net, struct proto *p, rte *new)
        p->rte_remove(net, old);
       rte_free(old);
     }
-  new->lastmod = now;
-  if (p->rte_insert)
-    p->rte_insert(net, new);
+  if (new)
+    {
+      new->lastmod = now;
+      if (p->rte_insert)
+       p->rte_insert(net, new);
+    }
 }
 
 void