summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rarpd/rarpd.c
diff options
context:
space:
mode:
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