Permalink
Browse files

Add comment in update_source.

  • Loading branch information...
1 parent 4933f23 commit fb3cba7dca9074f51587ebbca0b8bffe813455ed @jech committed Nov 25, 2011
Showing with 4 additions and 0 deletions.
  1. +4 −0 source.c
View
@@ -116,6 +116,10 @@ update_source(struct source *src,
if(metric >= INFINITY)
return;
+ /* If a source is expired, pretend that it doesn't exist and update
+ it unconditionally. This makes ensures that old data will
+ eventually be overridden, and prevents us from getting stuck if
+ a router loses its sequence number. */
if(src->time < now.tv_sec - SOURCE_GC_TIME ||
seqno_compare(src->seqno, seqno) < 0 ||
(src->seqno == seqno && src->metric > metric)) {

0 comments on commit fb3cba7

Please sign in to comment.