summaryrefslogtreecommitdiff
path: root/nest/rt-dev.c
diff options
context:
space:
mode:
authorJan Moskyto Matejka <mq@ucw.cz>2016-05-10 14:21:15 +0200
committerJan Moskyto Matejka <mq@ucw.cz>2016-05-10 14:21:15 +0200
commit92912f063a94bd7c743a25628ca2073380e09ef4 (patch)
treee8328b04713b3004747bcd3160294dd97e16b35e /nest/rt-dev.c
parenta8caff322f83f1303c408bbefc440aeea9e619a3 (diff)
parent2003a1840731bd57365876e48c96c5a1ea0348cb (diff)
Merge remote-tracking branch 'origin/rte-update' into int-new
Diffstat (limited to 'nest/rt-dev.c')
-rw-r--r--nest/rt-dev.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/nest/rt-dev.c b/nest/rt-dev.c
index a996f4fc..098885b9 100644
--- a/nest/rt-dev.c
+++ b/nest/rt-dev.c
@@ -55,24 +55,15 @@ dev_ifa_notify(struct proto *P, uint flags, struct ifa *ad)
if (flags & IF_CHANGE_DOWN)
{
- net *n;
-
DBG("dev_if_notify: %s:%I going down\n", ad->iface->name, ad->ip);
- n = net_find(c->table, &ad->prefix);
- if (!n)
- {
- DBG("dev_if_notify: device shutdown: prefix not found\n");
- return;
- }
/* Use iface ID as local source ID */
struct rte_src *src = rt_get_source(P, ad->iface->index);
- rte_update2(c, n, NULL, src);
+ rte_update2(c, &ad->prefix, NULL, src);
}
else if (flags & IF_CHANGE_UP)
{
rta *a;
- net *n;
rte *e;
DBG("dev_if_notify: %s:%I going up\n", ad->iface->name, ad->ip);
@@ -90,11 +81,9 @@ dev_ifa_notify(struct proto *P, uint flags, struct ifa *ad)
};
a = rta_lookup(&a0);
- n = net_get(c->table, &ad->prefix);
e = rte_get_temp(a);
- e->net = n;
e->pflags = 0;
- rte_update2(c, n, e, src);
+ rte_update2(c, &ad->prefix, e, src);
}
}