From f65c28998299c63769d57c70b2426a3169af31e1 Mon Sep 17 00:00:00 2001 From: Joe Talerico Date: Fri, 6 Oct 2023 14:41:53 -0400 Subject: [PATCH] Fixing HostNetwork Bug Signed-off-by: Joe Talerico --- cmd/k8s-netperf/k8s-netperf.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/k8s-netperf/k8s-netperf.go b/cmd/k8s-netperf/k8s-netperf.go index 6e32bcd2..a0fad393 100644 --- a/cmd/k8s-netperf/k8s-netperf.go +++ b/cmd/k8s-netperf/k8s-netperf.go @@ -332,7 +332,11 @@ func executeWorkload(nc config.Config, s config.PerfScenarios, hostNet bool, ipe serverIP = s.NetperfService.Spec.ClusterIP } } else { - serverIP = s.Server.Items[0].Status.PodIP + if hostNet { + serverIP = s.ServerHost.Items[0].Status.PodIP + } else { + serverIP = s.Server.Items[0].Status.PodIP + } } if !s.NodeLocal { Client = s.ClientAcross