diff options
| author | Mark Johnston <markj@FreeBSD.org> | 2019-05-21 21:22:43 +0000 |
|---|---|---|
| committer | Mark Johnston <markj@FreeBSD.org> | 2019-05-21 21:22:43 +0000 |
| commit | 35131b461677fa6c1d7bb8d47a11058e32c4be82 (patch) | |
| tree | 982f2a2c8ede1c29064943bb44b53db3701a11b9 /libexec/bootpd/bootpd.c | |
| parent | 594d1c7235ecf666193b17396844f2ec235ba566 (diff) | |
Notes
Diffstat (limited to 'libexec/bootpd/bootpd.c')
| -rw-r--r-- | libexec/bootpd/bootpd.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/libexec/bootpd/bootpd.c b/libexec/bootpd/bootpd.c index afd5c77d6a99..507678a57a16 100644 --- a/libexec/bootpd/bootpd.c +++ b/libexec/bootpd/bootpd.c @@ -143,6 +143,7 @@ struct timeval actualtimeout = 15 * 60L, /* tv_sec */ 0 /* tv_usec */ }; +int arpmod = TRUE; /* modify the ARP table */ /* * General @@ -266,6 +267,9 @@ main(argc, argv) break; switch (argv[0][1]) { + case 'a': /* don't modify the ARP table */ + arpmod = FALSE; + break; case 'c': /* chdir_path */ if (argv[0][2]) { stmp = &(argv[0][2]); @@ -583,8 +587,9 @@ PRIVATE void usage() { fprintf(stderr, - "usage: bootpd [-i | -s] [-c chdir-path] [-d level] [-h hostname] [-t timeout]\n"); + "usage: bootpd [-a] [-i | -s] [-c chdir-path] [-d level] [-h hostname] [-t timeout]\n"); fprintf(stderr, " [bootptab [dumpfile]]\n"); + fprintf(stderr, "\t -a\tdon't modify ARP table\n"); fprintf(stderr, "\t -c n\tset current directory\n"); fprintf(stderr, "\t -d n\tset debug level\n"); fprintf(stderr, "\t -h n\tset the hostname to listen on\n"); @@ -1067,10 +1072,12 @@ sendreply(forward, dst_override) if (haf == 0) haf = HTYPE_ETHERNET; - if (debug > 1) - report(LOG_INFO, "setarp %s - %s", - inet_ntoa(dst), haddrtoa(ha, len)); - setarp(s, &dst, haf, ha, len); + if (arpmod) { + if (debug > 1) + report(LOG_INFO, "setarp %s - %s", + inet_ntoa(dst), haddrtoa(ha, len)); + setarp(s, &dst, haf, ha, len); + } } if ((forward == 0) && |
