Commit 531d5da4 authored by Antti Paila's avatar Antti Paila Committed by Stephen Hemminger

ip: Preserve original portocol family in batch mode

Reset the 'preferred_family' global variable
to its initially set value before each batch
file command is processed.
Signed-off-by: default avatarAntti Paila <antti.paila@gmail.com>
parent cd8df30b
......@@ -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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment