system: fix treatment of RT_TABLE_MAIN
[project/netifd.git] / proto-static.c
index 86f2f20..51e2083 100644 (file)
@@ -33,7 +33,11 @@ struct static_proto_state {
 static bool
 static_proto_setup(struct static_proto_state *state)
 {
-       return proto_apply_ip_settings(state->proto.iface, state->config, false) == 0;
+       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;
 }
 
 static int
@@ -52,8 +56,10 @@ static_handler(struct interface_proto_state *proto,
 
                break;
        case PROTO_CMD_TEARDOWN:
+       case PROTO_CMD_RENEW:
                break;
        }
+
        return ret;
 }