From e1c275d87b26f35c29ec8bfab0a3265810463574 Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Sat, 2 Feb 2019 13:28:16 +0100 Subject: Nest: Reestablish preferred counters --- nest/rt-table.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'nest/rt-table.c') 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) -- cgit v1.2.3