summaryrefslogtreecommitdiff
path: root/nest/rt-dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'nest/rt-dev.c')
-rw-r--r--nest/rt-dev.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/nest/rt-dev.c b/nest/rt-dev.c
index 61f025ce..05e64fc3 100644
--- a/nest/rt-dev.c
+++ b/nest/rt-dev.c
@@ -83,7 +83,7 @@ dev_ifa_notify(struct proto *P, uint flags, struct ifa *ad)
struct rte_src *src = rt_get_source(P, ad->iface->index);
rta a0 = {
- .src = src,
+ .pref = c->preference,
.source = RTS_DEVICE,
.scope = SCOPE_UNIVERSE,
.dest = RTD_UNICAST,
@@ -91,7 +91,7 @@ dev_ifa_notify(struct proto *P, uint flags, struct ifa *ad)
};
a = rta_lookup(&a0);
- e = rte_get_temp(a);
+ e = rte_get_temp(a, src);
e->pflags = 0;
rte_update2(c, net, e, src);
}
@@ -195,3 +195,9 @@ struct protocol proto_device = {
.reconfigure = dev_reconfigure,
.copy_config = dev_copy_config
};
+
+void
+dev_build(void)
+{
+ proto_build(&proto_device);
+}