Remove bogus check in check_features

The check_features RPC function required that both known fields are
present. Without those fields it exited with an error. If RPC users
where not specifying all parameters it would fail. It should, however,
be possible to only check for a subset of options.

Each supported option is checked separately anyway in the forked criu
which does the actual check.

Removing the check also enables RPC clients with older protobuf
definitions to use the feature check.

Signed-off-by: Adrian Reber <areber@redhat.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
Adrian Reber 2017-03-14 17:43:00 +01:00 committed by Andrei Vagin
parent 3706af7b3f
commit 23bdb6173c

View file

@ -869,13 +869,6 @@ static int handle_feature_check(int sk, CriuReq * msg)
feat.has_lazy_pages = 1;
feat.lazy_pages = false;
/* Check if the requested feature check can be answered. */
if ((msg->features->has_mem_track != 1) ||
(msg->features->has_lazy_pages != 1)) {
pr_warn("Feature checking for unknown feature.\n");
goto out;
}
pid = fork();
if (pid < 0) {
pr_perror("Can't fork");