summaryrefslogtreecommitdiffstats
path: root/web/attachments/450268-nagios-plugins.patch
blob: f70b810e7ea812ebfc1c975d108c3088ffb90e47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
diff -r ./config.h nagios-plugins/config.h
1539,1541d1538
< /* path and args for ICMP ping command with defined source */
< #define PING_COMMAND_SOURCE "/sbin/ping -S %s -n -c %d %s"
< 
Только в .: nagios-plugins
Только в .: nagios-plugins.patch
diff -r ./plugins/check_ping.c nagios-plugins/plugins/check_ping.c
39d38
< #include "arpa/inet.h"
63d61
< char *source = NULL;
73a72,73
> 
> 
90a91
> 	/* Parse extra opts if any */
115,118c116
< 			if (source == NULL)
< 				rawcmd = strdup(PING_COMMAND);
< 			else
< 				rawcmd = strdup(PING_COMMAND_SOURCE);
---
> 			rawcmd = strdup(PING_COMMAND);
120c118
< 		rawcmd = strdup(PING_COMMAND_SOURCE);
---
> 		rawcmd = strdup(PING_COMMAND);
128c126
< 		asprintf (&cmd, rawcmd, source, max_packets, addresses[i]);
---
> 		asprintf (&cmd, rawcmd, max_packets, addresses[i]);
205d202
< 		{"source", optional_argument, 0, 'S'},
220c217
< 		c = getopt_long (argc, argv, "VvhnL46t:c:w:H:p:S:", longopts, &option);
---
> 		c = getopt_long (argc, argv, "VvhnL46t:c:w:H:p:", longopts, &option);
271,278d267
< 		case 'S':	/* source address */
< 			ptr = optarg;
< 			source = ptr;
< 			struct sockaddr_in sa;
< 			char str[INET_ADDRSTRLEN];
< 			if (inet_pton(AF_INET, source, &(sa.sin_addr)) != 0)
< 				die (STATE_UNKNOWN, _("Bad local source\n"));
< 			break;
580d568
< 	printf (" %s\n", "-S, --source=IP");
612c600
< 	printf ("%s -S <source_address> -H <host_address> -w <wrta>,<wpl>%% -c <crta>,<cpl>%%\n", progname);
---
> 	printf ("%s -H <host_address> -w <wrta>,<wpl>%% -c <crta>,<cpl>%%\n", progname);