summaryrefslogtreecommitdiff
path: root/usr.sbin/rwhod
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>1999-06-16 21:05:21 +0000
committerBrian Somers <brian@FreeBSD.org>1999-06-16 21:05:21 +0000
commit2a7bd79571e742e91c3df8b4fa75cdb40292849c (patch)
treea359607c573a81abc5ad921c5f7929e403dac3e6 /usr.sbin/rwhod
parenta0a549c7fd970692502ac6326d73ebbe24a496ba (diff)
downloadsrc-test2-2a7bd79571e742e91c3df8b4fa75cdb40292849c.tar.gz
src-test2-2a7bd79571e742e91c3df8b4fa75cdb40292849c.zip
Notes
Diffstat (limited to 'usr.sbin/rwhod')
-rw-r--r--usr.sbin/rwhod/rwhod.810
-rw-r--r--usr.sbin/rwhod/rwhod.c7
2 files changed, 15 insertions, 2 deletions
diff --git a/usr.sbin/rwhod/rwhod.8 b/usr.sbin/rwhod/rwhod.8
index 8050ca97f425..fafd22348b35 100644
--- a/usr.sbin/rwhod/rwhod.8
+++ b/usr.sbin/rwhod/rwhod.8
@@ -40,6 +40,7 @@
.Sh SYNOPSIS
.Nm rwhod
.Op Fl i
+.Op Fl p
.Op Fl l
.Op Fl m Op Ar ttl
.Sh DESCRIPTION
@@ -76,6 +77,15 @@ option enables insecure mode, which causes
to ignore the source port on incoming packets.
.Pp
The
+.Fl p
+option tells
+.Nm
+to ignore all
+.Dv POINTOPOINT
+interfaces. This is useful if you do not wish to keep dial on demand
+interfaces permanently active.
+.Pp
+The
.Fl l
option enables listen mode, which causes
.Nm
diff --git a/usr.sbin/rwhod/rwhod.c b/usr.sbin/rwhod/rwhod.c
index 6b6899f6b274..e1c9ec092edd 100644
--- a/usr.sbin/rwhod/rwhod.c
+++ b/usr.sbin/rwhod/rwhod.c
@@ -42,7 +42,7 @@ static const char copyright[] =
static char sccsid[] = "@(#)rwhod.c 8.1 (Berkeley) 6/6/93";
#endif
static const char rcsid[] =
- "$Id: rwhod.c,v 1.8 1998/12/17 11:05:57 des Exp $";
+ "$Id: rwhod.c,v 1.9 1999/01/11 05:27:37 steve Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -117,6 +117,7 @@ static const char rcsid[] =
int insecure_mode;
int quiet_mode;
+int iff_flag = IFF_POINTOPOINT;
int multicast_mode = NO_MULTICAST;
int multicast_scope;
struct sockaddr_in multicast_addr = { sizeof multicast_addr, AF_INET };
@@ -200,6 +201,8 @@ main(argc, argv)
insecure_mode = 1;
else if (strcmp(*argv, "-l") == 0)
quiet_mode = 1;
+ else if (strcmp(*argv, "-p") == 0)
+ iff_flag = 0;
else
usage();
argv++, argc--;
@@ -604,7 +607,7 @@ configure(s)
if ((flags & IFF_UP) == 0 ||
(flags & (((multicast_mode == PER_INTERFACE_MULTICAST) ?
IFF_MULTICAST : 0) |
- IFF_BROADCAST|IFF_POINTOPOINT)) == 0)
+ IFF_BROADCAST|iff_flag)) == 0)
continue;
if (ifm->ifm_type != RTM_NEWADDR)
quit("out of sync parsing NET_RT_IFLIST");