summaryrefslogtreecommitdiff
path: root/proto/babel/babel.c
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2017-10-13 19:34:34 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2017-12-07 13:53:42 +0100
commit38f4721092f5a835248f9f521d34990ec9883dbd (patch)
tree8abc57ca498f9bbc5eb0467d896fc8bc2b0e8a7a /proto/babel/babel.c
parent5ee69d11f2e859b77ff04bb4068f43082fd1794f (diff)
Babel: Avoid batch seqno updates
Diffstat (limited to 'proto/babel/babel.c')
-rw-r--r--proto/babel/babel.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/proto/babel/babel.c b/proto/babel/babel.c
index 10974474..54b31c22 100644
--- a/proto/babel/babel.c
+++ b/proto/babel/babel.c
@@ -760,6 +760,13 @@ babel_send_update_(struct babel_iface *ifa, btime changed, struct fib *rtable)
{
struct babel_proto *p = ifa->proto;
+ /* Update increase was requested */
+ if (p->update_seqno_inc)
+ {
+ p->update_seqno++;
+ p->update_seqno_inc = 0;
+ }
+
FIB_WALK(rtable, struct babel_entry, e)
{
struct babel_route *r = e->selected_out;
@@ -1299,8 +1306,8 @@ babel_handle_seqno_request(union babel_msg *m, struct babel_iface *ifa)
/* Seqno is larger; check if we own the router id */
if (msg->router_id == p->router_id)
{
- /* Ours; update seqno and trigger global update */
- p->update_seqno++;
+ /* Ours; seqno increase and trigger global update */
+ p->update_seqno_inc = 1;
babel_trigger_update(p);
}
else