summaryrefslogtreecommitdiff
path: root/nest/rt-table.c
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2019-02-02 13:28:16 +0100
committerOndrej Zajicek (work) <santiago@crfreenet.org>2019-02-02 13:28:16 +0100
commite1c275d87b26f35c29ec8bfab0a3265810463574 (patch)
treebcf016c214a44872eade8b1baa49b5e99e5f0c8c /nest/rt-table.c
parente84c81b76ff6af88041b55c4ed25c208f78d4826 (diff)
Nest: Reestablish preferred counters
Diffstat (limited to 'nest/rt-table.c')
-rw-r--r--nest/rt-table.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/nest/rt-table.c b/nest/rt-table.c
index 9952d91a..0224d434 100644
--- a/nest/rt-table.c
+++ b/nest/rt-table.c
@@ -901,8 +901,16 @@ rte_announce(rtable *tab, unsigned type, net *net, rte *new, rte *old,
if (!old && !new)
return;
- if ((type == RA_OPTIMAL) && tab->hostcache)
- rt_notify_hostcache(tab, net);
+ if (type == RA_OPTIMAL)
+ {
+ if (new)
+ new->sender->stats.pref_routes++;
+ if (old)
+ old->sender->stats.pref_routes--;
+
+ if (tab->hostcache)
+ rt_notify_hostcache(tab, net);
+ }
struct channel *c; node *n;
WALK_LIST2(c, n, tab->channels, table_node)