ip: Fix batch processing

After the comment cited below, batch mode neglects to set the global
variable batch_mode to a non-zero value. Netns and VRF commands use this
variable, and break in batch mode. Fix by setting the value again.

Fixes: 1d9a81b8c9 ("Unify batch processing across tools")
Reported-by: Tim Rice <trice@posteo.net>
Signed-off-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
This commit is contained in:
Petr Machata 2021-03-17 13:24:14 +01:00 committed by Stephen Hemminger
parent 872689d431
commit 7384c15e0e
1 changed files with 1 additions and 0 deletions

View File

@ -156,6 +156,7 @@ static int batch(const char *name)
return EXIT_FAILURE;
}
batch_mode = 1;
ret = do_batch(name, force, ip_batch_cmd, &orig_family);
rtnl_close(&rth);