Blob Blame History Raw
diff -urN zabbix-5.0.14.orig/src/libs/zbxicmpping/icmpping.c zabbix-5.0.14/src/libs/zbxicmpping/icmpping.c
--- zabbix-5.0.14.orig/src/libs/zbxicmpping/icmpping.c	2021-07-16 18:09:40.807727222 +0300
+++ zabbix-5.0.14/src/libs/zbxicmpping/icmpping.c	2021-07-16 18:11:43.121350484 +0300
@@ -53,34 +53,7 @@
 
 static void	get_source_ip_option(const char *fping, const char **option, unsigned char *checked)
 {
-	FILE	*f;
-	char	*p, tmp[MAX_STRING_LEN];
-
-	zbx_snprintf(tmp, sizeof(tmp), "%s -h 2>&1", fping);
-
-	if (NULL == (f = popen(tmp, "r")))
-		return;
-
-	while (NULL != zbx_fgets(tmp, sizeof(tmp), f))
-	{
-		for (p = tmp; isspace(*p); p++)
-			;
-
-		if ('-' == p[0] && 'I' == p[1] && (isspace(p[2]) || ',' == p[2]))
-		{
-			*option = "-I";
-			continue;
-		}
-
-		if ('-' == p[0] && 'S' == p[1] && (isspace(p[2]) || ',' == p[2]))
-		{
-			*option = "-S";
-			break;
-		}
-	}
-
-	pclose(f);
-
+	*option = "-S";
 	*checked = 1;
 }