summaryrefslogtreecommitdiff
path: root/nest/rt-table.c
diff options
context:
space:
mode:
authorJan Moskyto Matejka <mq@ucw.cz>2016-05-10 14:30:49 +0200
committerJan Moskyto Matejka <mq@ucw.cz>2016-05-10 14:30:49 +0200
commit0c6dfe52369a59d7f3da8ee6bc7c505e3da5c064 (patch)
tree264aa0aa4e9393491d74d473181faab4ae288cb9 /nest/rt-table.c
parent7a7ac656829223713f9e6bcef63d2b5a5efce7d2 (diff)
parent92912f063a94bd7c743a25628ca2073380e09ef4 (diff)
Merge branch 'int-new' into int-new-merged
Diffstat (limited to 'nest/rt-table.c')
-rw-r--r--nest/rt-table.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/nest/rt-table.c b/nest/rt-table.c
index 03ab3b92..9614d9ef 100644
--- a/nest/rt-table.c
+++ b/nest/rt-table.c
@@ -1267,19 +1267,23 @@ rte_unhide_dummy_routes(net *net, rte **dummy)
*/
void
-rte_update2(struct channel *c, net *net, rte *new, struct rte_src *src)
+rte_update2(struct channel *c, net_addr *n, rte *new, struct rte_src *src)
{
struct proto *p = c->proto;
struct proto_stats *stats = &c->stats;
struct filter *filter = c->in_filter;
ea_list *tmpa = NULL;
rte *dummy = NULL;
+ net *nn;
ASSERT(c->channel_state == CS_UP);
rte_update_lock();
if (new)
{
+ nn = net_get(c->table, n);
+
+ new->net = nn;
new->sender = c;
if (!new->pref)
@@ -1333,7 +1337,7 @@ rte_update2(struct channel *c, net *net, rte *new, struct rte_src *src)
{
stats->imp_withdraws_received++;
- if (!net || !src)
+ if (!(nn = net_find(c->table, n)) || !src)
{
stats->imp_withdraws_ignored++;
rte_update_unlock();
@@ -1342,9 +1346,9 @@ rte_update2(struct channel *c, net *net, rte *new, struct rte_src *src)
}
recalc:
- rte_hide_dummy_routes(net, &dummy);
- rte_recalculate(c, net, new, src);
- rte_unhide_dummy_routes(net, &dummy);
+ rte_hide_dummy_routes(nn, &dummy);
+ rte_recalculate(c, nn, new, src);
+ rte_unhide_dummy_routes(nn, &dummy);
rte_update_unlock();
return;