diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2013-11-24 22:22:24 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2013-11-24 22:22:24 +0100 |
commit | 5ebc92935cb58c78286d91f0831de94cd4ae0f9e (patch) | |
tree | 73b7d20598044ff760259d047edf2694dcfa7223 /nest/proto.c | |
parent | c72aca41e5fa55b0efa768e93b55f5c307f84025 (diff) |
Last state change should track protocol state change.
And not core state change, which is not much relevant
(e.g. refeed in BGP).
Diffstat (limited to 'nest/proto.c')
-rw-r--r-- | nest/proto.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nest/proto.c b/nest/proto.c index 75ba10dd..5876e5d4 100644 --- a/nest/proto.c +++ b/nest/proto.c @@ -48,7 +48,6 @@ static void proto_enqueue(list *l, struct proto *p) { add_tail(l, &p->n); - p->last_state_change = now; } static void @@ -362,6 +361,8 @@ proto_init(struct proto_config *c) q->proto_state = PS_DOWN; q->core_state = FS_HUNGRY; + q->last_state_change = now; + proto_enqueue(&initial_proto_list, q); if (p == &proto_unix_iface) initial_device_proto = q; @@ -1077,6 +1078,7 @@ proto_notify_state(struct proto *p, unsigned ps) return; p->proto_state = ps; + p->last_state_change = now; switch (ps) { |