All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH COMMITTED] lib/tst_net_iface_prefix: export correct env variable for interface
@ 2018-03-21 11:39 Alexey Kodanev
  0 siblings, 0 replies; only message in thread
From: Alexey Kodanev @ 2018-03-21 11:39 UTC (permalink / raw)
  To: ltp

This is fixing setups with different interface names between local
and remote host. netns setup is not affected because interface names
are set explicitly before the exports with tst_net_iface_prefix.

Signed-off-by: Alexey Kodanev <alexey.kodanev@oracle.com>
---
 testcases/lib/tst_net_iface_prefix.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/testcases/lib/tst_net_iface_prefix.c b/testcases/lib/tst_net_iface_prefix.c
index 3868d36..a9e3882 100644
--- a/testcases/lib/tst_net_iface_prefix.c
+++ b/testcases/lib/tst_net_iface_prefix.c
@@ -152,13 +152,11 @@ int main(int argc, char *argv[])
 	else
 		get_in_addr(ip_str, &ip);
 
-	if (is_ipv6) {
-		print_svar_change("LHOST_IFACES", iface);
+	print_svar_change(is_rhost ? "RHOST_IFACES" : "LHOST_IFACES", iface);
+	if (is_ipv6)
 		print_ivar(is_rhost ? "IPV6_RPREFIX" : "IPV6_LPREFIX", prefix);
-	} else {
-		print_svar_change("RHOST_IFACES", iface);
+	else
 		print_ivar(is_rhost ? "IPV4_RPREFIX" : "IPV4_LPREFIX", prefix);
-	}
 
 	exit(EXIT_SUCCESS);
 }
-- 
1.7.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-03-21 11:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-21 11:39 [LTP] [PATCH COMMITTED] lib/tst_net_iface_prefix: export correct env variable for interface Alexey Kodanev

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.