summaryrefslogtreecommitdiff
path: root/nest/rt-dev.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-dev.c
parent7a7ac656829223713f9e6bcef63d2b5a5efce7d2 (diff)
parent92912f063a94bd7c743a25628ca2073380e09ef4 (diff)
Merge branch 'int-new' into int-new-merged
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);
}
}