[<prev] [next>] [day] [month] [year] [list]
Message-ID: <3963278ba3956499a8f1506a112a10547946d75f.1615983771.git.petrm@nvidia.com>
Date: Wed, 17 Mar 2021 13:24:14 +0100
From: Petr Machata <petrm@...dia.com>
To: <netdev@...r.kernel.org>, <dsahern@...il.com>,
<stephen@...workplumber.org>
CC: Petr Machata <petrm@...dia.com>, Tim Rice <trice@...teo.net>
Subject: [PATCH iproute2] 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 <trice@...teo.net>
Signed-off-by: Petr Machata <petrm@...dia.com>
---
ip/ip.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/ip/ip.c b/ip/ip.c
index 40d2998ae60b..2d7d0d327734 100644
--- a/ip/ip.c
+++ b/ip/ip.c
@@ -155,6 +155,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);
--
2.26.2
Powered by blists - more mailing lists