lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 31 Jul 2015 13:55:31 +0300
From:	Antti Paila <antti.paila@...il.com>
To:	netdev@...r.kernel.org
Cc:	Antti Paila <antti.paila@...il.com>
Subject: [PATCH] ip: Preserve original portocol family in batch mode

From: Antti Paila <antti.paila@...il.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@...il.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 majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ