From 7384c15e0e66f7cc5f8385b341b6a553a60914e5 Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Wed, 17 Mar 2021 13:24:14 +0100 Subject: [PATCH] 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: 1d9a81b8c9f3 ("Unify batch processing across tools") Reported-by: Tim Rice Signed-off-by: Petr Machata Signed-off-by: Stephen Hemminger --- ip/ip.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ip/ip.c b/ip/ip.c index c561c01f..4cf09fc3 100644 --- a/ip/ip.c +++ b/ip/ip.c @@ -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);