Message ID | 1438340131-13882-1-git-send-email-antti.paila@stonesoft.com |
---|---|
State | Accepted, archived |
Delegated to: | stephen hemminger |
Headers | show |
On Fri, 31 Jul 2015 13:55:31 +0300 Antti Paila <antti.paila@gmail.com> wrote: > From: Antti Paila <antti.paila@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.paila@gmail.com> Applied for 4.2 release. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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 */