summaryrefslogtreecommitdiff
path: root/proto
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2017-11-28 17:06:10 +0100
committerOndrej Zajicek (work) <santiago@crfreenet.org>2017-12-07 13:53:42 +0100
commit574b2324275d3292e98a8e329f791eb5c799f7f2 (patch)
tree37f5bcc1edf1bcdcd61380c76fe214afce523bcd /proto
parent3b3b0910ffb1b212b1c9ea420db6c575a3ecb71a (diff)
Timers: Fix TBF and some last remains
Diffstat (limited to 'proto')
-rw-r--r--proto/ospf/ospf.h2
-rw-r--r--proto/rip/packets.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/proto/ospf/ospf.h b/proto/ospf/ospf.h
index dbc231b6..d4571bf6 100644
--- a/proto/ospf/ospf.h
+++ b/proto/ospf/ospf.h
@@ -58,7 +58,7 @@
log_rl(&p->log_lsa_tbf, L_REMOTE "%s: " msg, p->p.name, args)
#define LOG_LSA2(msg, args...) \
- do { if (! p->log_lsa_tbf.mark) \
+ do { if (! p->log_lsa_tbf.drop) \
log(L_REMOTE "%s: " msg, p->p.name, args); } while(0)
diff --git a/proto/rip/packets.c b/proto/rip/packets.c
index 1518dd3f..4925ca36 100644
--- a/proto/rip/packets.c
+++ b/proto/rip/packets.c
@@ -189,7 +189,10 @@ rip_update_csn(struct rip_proto *p UNUSED, struct rip_iface *ifa)
* have the same CSN. We are using real time, but enforcing monotonicity.
*/
if (ifa->cf->auth_type == RIP_AUTH_CRYPTO)
- ifa->csn = (ifa->csn < (u32) now_real) ? (u32) now_real : ifa->csn + 1;
+ {
+ u32 now_real = (u32) (current_real_time() TO_S);
+ ifa->csn = (ifa->csn < now_real) ? now_real : ifa->csn + 1;
+ }
}
static void