summaryrefslogtreecommitdiffstats
path: root/sysdep
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2010-05-21 11:51:39 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2010-05-21 12:00:53 +0200
commit002b6423188abdd62c5a494069fd299b96863a79 (patch)
tree130e6a774f7e8a27b5eb9c198481efbd548d0b63 /sysdep
parentc1cefd7bea79201c58c7c0fa8e192be3cc5ed771 (diff)
downloadbird-002b6423188abdd62c5a494069fd299b96863a79.tar
bird-002b6423188abdd62c5a494069fd299b96863a79.zip
Fixes bug on Linux 2.4.x - kernel sync does not work until restart of kernel protocol.
Which was, actually, a bug in timers - on older kernel, monotonic timer is missing and the other implementation started with now == 0, which collides with usage 0 as a special value in timer->expires field.
Diffstat (limited to 'sysdep')
-rw-r--r--sysdep/unix/io.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c
index 456644b..8058fa6 100644
--- a/sysdep/unix/io.c
+++ b/sysdep/unix/io.c
@@ -117,7 +117,8 @@ tracked_fopen(pool *p, char *name, char *mode)
static list near_timers, far_timers;
static bird_clock_t first_far_timer = TIME_INFINITY;
-bird_clock_t now, now_real;
+/* now must be different from 0, because 0 is a special value in timer->expires */
+bird_clock_t now = 1, now_real;
static void
update_times_plain(void)