From: Antti Paila <antti.pa...@gmail.com>

Reset the 'preferred_family' global variable
to its initially set value before each batch
file command is processed.

Signed-off-by: Antti Paila <antti.pa...@gmail.com>
---
 ip/ip.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ip/ip.c b/ip/ip.c
index 3d993b9..0cf743f 100644
--- a/ip/ip.c
+++ b/ip/ip.c
@@ -118,6 +118,7 @@ static int batch(const char *name)
        char *line = NULL;
        size_t len = 0;
        int ret = EXIT_SUCCESS;
+       int orig_family = preferred_family;
 
        batch_mode = 1;
 
@@ -140,6 +141,8 @@ static int batch(const char *name)
                char *largv[100];
                int largc;
 
+               preferred_family = orig_family;
+
                largc = makeargs(line, largv, 100);
                if (largc == 0)
                        continue;       /* blank line */
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to