X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=blobdiff_plain;f=proto-static.c;h=3e33c3d872930d08b9e1bef907afa14c0db7507c;hp=b492d923985dd6ed0f3b6048b44faeca6c9ff30e;hb=a03216660797173fbe67866f75564e3fec9c1e8d;hpb=3d317e90f15eec480b23f4dcddb841c292bef690 diff --git a/proto-static.c b/proto-static.c index b492d92..3e33c3d 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; } @@ -96,7 +100,8 @@ error: static struct proto_handler static_proto = { .name = "static", - .flags = PROTO_FLAG_IMMEDIATE, + .flags = PROTO_FLAG_IMMEDIATE | + PROTO_FLAG_FORCE_LINK_DEFAULT, .config_params = &proto_ip_attr, .attach = static_attach, };