From: Petr Machata Date: Wed, 17 Mar 2021 12:24:14 +0000 (+0100) Subject: ip: Fix batch processing X-Git-Tag: v5.12.0~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7384c15e0e66f7cc5f8385b341b6a553a60914e5;p=thirdparty%2Fiproute2.git 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 --- diff --git a/ip/ip.c b/ip/ip.c index c561c01f6..4cf09fc3b 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);