View | Details | Raw Unified | Return to bug 235415 | Differences between
and this patch

Collapse All | Expand All

(-)arpwatch.c (-3 / +20 lines)
Lines 107-112 Link Here
107
107
108
char *prog;
108
char *prog;
109
109
110
char *Watcher = NULL;
111
110
int can_checkpoint;
112
int can_checkpoint;
111
int swapped;
113
int swapped;
112
int nobogons;
114
int nobogons;
Lines 170-176 Link Here
170
	interface = NULL;
172
	interface = NULL;
171
	rfilename = NULL;
173
	rfilename = NULL;
172
	pd = NULL;
174
	pd = NULL;
173
	while ((op = getopt(argc, argv, "df:i:n:Nr:")) != EOF)
175
	while ((op = getopt(argc, argv, "dvzf:i:m:n:Nr:")) != EOF)
174
		switch (op) {
176
		switch (op) {
175
177
176
		case 'd':
178
		case 'd':
Lines 202-207 Link Here
202
			rfilename = optarg;
204
			rfilename = optarg;
203
			break;
205
			break;
204
206
207
		case 'm':
208
			Watcher = optarg;
209
			break;
210
		case 'v':
211
			vrrpflag = 1;
212
			break;
213
		case 'z':
214
			zeroflag = 1;
215
			break;
216
205
		default:
217
		default:
206
			usage();
218
			usage();
207
		}
219
		}
Lines 321-327 Link Here
321
333
322
	(void)setsignal(SIGINT, die);
334
	(void)setsignal(SIGINT, die);
323
	(void)setsignal(SIGTERM, die);
335
	(void)setsignal(SIGTERM, die);
324
	(void)setsignal(SIGHUP, die);
325
	if (rfilename == NULL) {
336
	if (rfilename == NULL) {
326
		(void)setsignal(SIGQUIT, checkpoint);
337
		(void)setsignal(SIGQUIT, checkpoint);
327
		(void)setsignal(SIGALRM, checkpoint);
338
		(void)setsignal(SIGALRM, checkpoint);
Lines 391-396 Link Here
391
		return;
402
		return;
392
	}
403
	}
393
404
405
	/* Check for CARP-generated ARP replies and ignore them */
406
	if (vrrpflag == 1 && MEMCMP(sha, vrrp_prefix, 5) == 0) {
407
		/* do nothing */
408
		return;
409
	}
410
394
	/* Double check ethernet addresses */
411
	/* Double check ethernet addresses */
395
	if (MEMCMP(sea, sha, 6) != 0) {
412
	if (MEMCMP(sea, sha, 6) != 0) {
396
		dosyslog(LOG_INFO, "ethernet mismatch", sia, sea, sha);
413
		dosyslog(LOG_INFO, "ethernet mismatch", sia, sea, sha);
Lines 751-756 Link Here
751
768
752
	(void)fprintf(stderr, "Version %s\n", version);
769
	(void)fprintf(stderr, "Version %s\n", version);
753
	(void)fprintf(stderr, "usage: %s [-dN] [-f datafile] [-i interface]"
770
	(void)fprintf(stderr, "usage: %s [-dN] [-f datafile] [-i interface]"
754
	    " [-n net[/width]] [-r file]\n", prog);
771
	    " [-m email] [-n net[/width]] [-r file]\n", prog);
755
	exit(1);
772
	exit(1);
756
}
773
}

Return to bug 235415