summaryrefslogtreecommitdiff
path: root/proto-static.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-04-10 17:21:21 +0200
committerFelix Fietkau <nbd@openwrt.org>2014-04-10 17:21:21 +0200
commite47461aedf90785f179331ac9a58127aadb3b650 (patch)
treeae3a5997d01a3d6301d680face7e2ed85256f362 /proto-static.c
parentd5452cb41927b580df46f3ac81ed9e77a7c83a51 (diff)
downloadnetifd-e47461aedf90785f179331ac9a58127aadb3b650.tar.gz
proto-static: ensure that the l3 device is properly set
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'proto-static.c')
-rw-r--r--proto-static.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/proto-static.c b/proto-static.c
index b492d92..51e2083 100644
--- a/proto-static.c
+++ b/proto-static.c
@@ -33,6 +33,10 @@ struct static_proto_state {
static bool
static_proto_setup(struct static_proto_state *state)
{
+ struct interface *iface = state->proto.iface;
+ struct device *dev = iface->main_dev.dev;
+
+ interface_set_l3_dev(iface, dev);
return proto_apply_static_ip_settings(state->proto.iface, state->config) == 0;
}