summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--nest/rt-dev.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/nest/rt-dev.c b/nest/rt-dev.c
index 81dd037..1794b90 100644
--- a/nest/rt-dev.c
+++ b/nest/rt-dev.c
@@ -48,7 +48,10 @@ dev_if_notify(struct proto *p, unsigned c, struct iface *old, struct iface *new)
A.iface = new;
A.attrs = NULL;
a = rta_lookup(&A);
- n = net_get(&master_table, 0, new->prefix, new->pxlen);
+ if (new->flags & IF_UNNUMBERED)
+ n = net_get(&master_table, 0, new->opposite, new->pxlen);
+ else
+ n = net_get(&master_table, 0, new->prefix, new->pxlen);
e = rte_get_temp(a);
e->pflags = 0;
rte_update(n, p, e);