summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rarpd/rarpd.c
diff options
context:
space:
mode:
authorfenner <fenner@FreeBSD.org>1996-11-27 20:45:10 +0000
committerfenner <fenner@FreeBSD.org>1996-11-27 20:45:10 +0000
commitfa5c595ab72bc21d8a8875e4248cbcdffbd1b5cb (patch)
treefb9bfdb7089bae3b7c956a4ba92322933e975cf4 /usr.sbin/rarpd/rarpd.c
parentc2f2394fba1c844b0d20931e00e4776fe91e6784 (diff)
downloadFreeBSD-src-fa5c595ab72bc21d8a8875e4248cbcdffbd1b5cb.zip
FreeBSD-src-fa5c595ab72bc21d8a8875e4248cbcdffbd1b5cb.tar.gz
Add -s flag to always supply mapping if known, ignoring the
presence or absence of files in /tftpboot.
Diffstat (limited to 'usr.sbin/rarpd/rarpd.c')
-rw-r--r--usr.sbin/rarpd/rarpd.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/usr.sbin/rarpd/rarpd.c b/usr.sbin/rarpd/rarpd.c
index 10c2ec2..0d9aa03 100644
--- a/usr.sbin/rarpd/rarpd.c
+++ b/usr.sbin/rarpd/rarpd.c
@@ -32,8 +32,8 @@ static const char rcsid[] =
/*
* rarpd - Reverse ARP Daemon
*
- * Usage: rarpd -a [ -fv ] [ hostname ]
- * rarpd [ -fv ] interface [ hostname ]
+ * Usage: rarpd -a [ -fsv ] [ hostname ]
+ * rarpd [ -fsv ] interface [ hostname ]
*
* 'hostname' is optional solely for backwards compatibility with Sun's rarpd.
* Currently, the argument is ignored.
@@ -170,6 +170,8 @@ void usage __P((void));
static u_char zero[6];
+int sflag = 0; /* ignore /tftpboot */
+
void
main(argc, argv)
int argc;
@@ -194,7 +196,7 @@ main(argc, argv)
openlog(name, LOG_PID | LOG_CONS, LOG_DAEMON);
opterr = 0;
- while ((op = getopt(argc, argv, "afv")) != EOF) {
+ while ((op = getopt(argc, argv, "afsv")) != EOF) {
switch (op) {
case 'a':
++aflag;
@@ -204,6 +206,10 @@ main(argc, argv)
++fflag;
break;
+ case 's':
+ ++sflag;
+ break;
+
case 'v':
++verbose;
break;
@@ -734,7 +740,7 @@ rarp_process(ii, pkt, len)
ename, intoa(ntohl(ii->ii_ipaddr & ii->ii_netmask)));
return;
}
- if (rarp_bootable(target_ipaddr))
+ if (sflag || rarp_bootable(target_ipaddr))
rarp_reply(ii, ep, target_ipaddr, len);
else if (verbose > 1)
syslog(LOG_INFO, "%s %s at %s DENIED (not bootable)",
OpenPOWER on IntegriCloud