diff --git a/rrmngmnt/network.py b/rrmngmnt/network.py index 0bb373a..6fed612 100644 --- a/rrmngmnt/network.py +++ b/rrmngmnt/network.py @@ -485,7 +485,7 @@ def delete_ifcfg_file(self, nic, ifcfg_path=IFCFG_PATH): return False return True - def send_icmp(self, dst, count="5", size="1500", extra_args=None): + def send_icmp(self, dst, count="5", size=None, extra_args=None): """ Send ICMP to destination IP/FQDN @@ -500,9 +500,9 @@ def send_icmp(self, dst, count="5", size="1500", extra_args=None): :return: True/False :rtype: bool """ - cmd = ["ping", dst, "-c", count, "-s", size] - if size != "1500": - cmd.extend(["-M", "do"]) + cmd = ["ping", dst, "-c", count] + if size is not None: + cmd.extend(["-s", str(size), "-M", "do"]) if extra_args is not None: for ar in extra_args.split(): cmd.extend(ar.split())