summaryrefslogtreecommitdiffstats
path: root/web/attachments/450268-nagios-plugins.patch
diff options
context:
space:
mode:
Diffstat (limited to 'web/attachments/450268-nagios-plugins.patch')
-rw-r--r--web/attachments/450268-nagios-plugins.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/web/attachments/450268-nagios-plugins.patch b/web/attachments/450268-nagios-plugins.patch
new file mode 100644
index 0000000..f70b810
--- /dev/null
+++ b/web/attachments/450268-nagios-plugins.patch
@@ -0,0 +1,53 @@
1diff -r ./config.h nagios-plugins/config.h
21539,1541d1538
3< /* path and args for ICMP ping command with defined source */
4< #define PING_COMMAND_SOURCE "/sbin/ping -S %s -n -c %d %s"
5<
6Только в .: nagios-plugins
7Только в .: nagios-plugins.patch
8diff -r ./plugins/check_ping.c nagios-plugins/plugins/check_ping.c
939d38
10< #include "arpa/inet.h"
1163d61
12< char *source = NULL;
1373a72,73
14>
15>
1690a91
17> /* Parse extra opts if any */
18115,118c116
19< if (source == NULL)
20< rawcmd = strdup(PING_COMMAND);
21< else
22< rawcmd = strdup(PING_COMMAND_SOURCE);
23---
24> rawcmd = strdup(PING_COMMAND);
25120c118
26< rawcmd = strdup(PING_COMMAND_SOURCE);
27---
28> rawcmd = strdup(PING_COMMAND);
29128c126
30< asprintf (&cmd, rawcmd, source, max_packets, addresses[i]);
31---
32> asprintf (&cmd, rawcmd, max_packets, addresses[i]);
33205d202
34< {"source", optional_argument, 0, 'S'},
35220c217
36< c = getopt_long (argc, argv, "VvhnL46t:c:w:H:p:S:", longopts, &option);
37---
38> c = getopt_long (argc, argv, "VvhnL46t:c:w:H:p:", longopts, &option);
39271,278d267
40< case 'S': /* source address */
41< ptr = optarg;
42< source = ptr;
43< struct sockaddr_in sa;
44< char str[INET_ADDRSTRLEN];
45< if (inet_pton(AF_INET, source, &(sa.sin_addr)) != 0)
46< die (STATE_UNKNOWN, _("Bad local source\n"));
47< break;
48580d568
49< printf (" %s\n", "-S, --source=IP");
50612c600
51< printf ("%s -S <source_address> -H <host_address> -w <wrta>,<wpl>%% -c <crta>,<cpl>%%\n", progname);
52---
53> printf ("%s -H <host_address> -w <wrta>,<wpl>%% -c <crta>,<cpl>%%\n", progname);