+2005-02-11 Hasso Tepper <hasso at quagga.net>
+
+ * ospf_lsdb.c: Fix sum of checksums calculation.
+
2005-02-09 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* ospf_packet.c: (ospf_write) If sendmsg fails, give more info in the
struct route_table *table;
struct prefix_ls lp;
struct route_node *rn;
+ struct ospf_lsa *old;
table = lsdb->type[lsa->data->type].db;
lsdb_prefix_set (&lp, lsa);
if (IS_LSA_SELF (lsa))
lsdb->type[lsa->data->type].count_self++;
lsdb->type[lsa->data->type].count++;
- lsdb->type[lsa->data->type].checksum += ntohs(lsa->data->checksum);
lsdb->total++;
}
else
if (rn->info == lsa)
return;
+ old = rn->info;
+ lsdb->type[old->data->type].checksum -= ntohs(old->data->checksum);
+
ospf_lsa_unlock (rn->info);
route_unlock_node (rn);
}
if (lsdb->new_lsa_hook != NULL)
(* lsdb->new_lsa_hook)(lsa);
#endif /* MONITOR_LSDB_CHANGE */
+ lsdb->type[lsa->data->type].checksum += ntohs(lsa->data->checksum);
rn->info = ospf_lsa_lock (lsa);
}