From c85ae9290fb7a378cb1cb513bf4e88ac4c017692 Mon Sep 17 00:00:00 2001 From: Quentin De Coninck Date: Tue, 7 Jul 2020 11:24:12 +0200 Subject: [PATCH] fixes possible ping issue --- topos/multi_interface.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/topos/multi_interface.py b/topos/multi_interface.py index 8b606da..5bb0195 100644 --- a/topos/multi_interface.py +++ b/topos/multi_interface.py @@ -207,10 +207,10 @@ class MultiInterfaceConfig(TopoConfig): return "{}{}.0/24".format(self.param.get(TopoParameter.RIGHT_SUBNET), interface_index) def client_interface_count(self): - return len(self.topo.c2r_client_switches) + return max(len(self.topo.c2r_client_switches), 1) def server_interface_count(self): - return len(self.topo.r2s_server_switches) + return max(len(self.topo.r2s_server_switches), 1) def get_router_interface_to_server_switch(self, switch_index): return self.get_router_interface_to_client_switch(len(self.topo.c2r_router_switches) + switch_index)