summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarchie <archie@FreeBSD.org>1998-12-07 05:54:37 +0000
committerarchie <archie@FreeBSD.org>1998-12-07 05:54:37 +0000
commit566ad3865222cd0e849ef3987803e416b3362c1e (patch)
tree0135bff283ebdfe9c50929518c19f565bca77080
parentef7d200c7ef8350c65299403419de4d3bdbeda9f (diff)
downloadFreeBSD-src-566ad3865222cd0e849ef3987803e416b3362c1e.zip
FreeBSD-src-566ad3865222cd0e849ef3987803e416b3362c1e.tar.gz
Disallow ipfw "tee" rules until it is actually implemented.
PR: bin/8471
-rw-r--r--sbin/ipfw/ipfw.82
-rw-r--r--sbin/ipfw/ipfw.c13
2 files changed, 10 insertions, 5 deletions
diff --git a/sbin/ipfw/ipfw.8 b/sbin/ipfw/ipfw.8
index d7f8cd8..6875c94 100644
--- a/sbin/ipfw/ipfw.8
+++ b/sbin/ipfw/ipfw.8
@@ -574,6 +574,8 @@ are reassembled before delivery to the socket, whereas fragments diverted via
are not.
.Pp
Port aliases containing dashes cannot be first in a list.
+.Pp
+The ``tee'' action is unimplemented.
.Sh AUTHORS
.An Ugen J. S. Antsilevich ,
.An Poul-Henning Kamp ,
diff --git a/sbin/ipfw/ipfw.c b/sbin/ipfw/ipfw.c
index d0f06ce..91a8a3a 100644
--- a/sbin/ipfw/ipfw.c
+++ b/sbin/ipfw/ipfw.c
@@ -16,7 +16,7 @@
*
* NEW command line interface for IP firewall facility
*
- * $Id: ipfw.c,v 1.60 1998/09/28 22:56:37 alex Exp $
+ * $Id: ipfw.c,v 1.61 1998/11/23 10:54:28 joerg Exp $
*
*/
@@ -879,7 +879,7 @@ add(ac,av)
} else if (!strncmp(*av,"divert",strlen(*av))) {
rule.fw_flg |= IP_FW_F_DIVERT; av++; ac--;
if (!ac)
- show_usage("missing divert port");
+ show_usage("missing %s port", "divert");
rule.fw_divert_port = strtoul(*av, NULL, 0); av++; ac--;
if (rule.fw_divert_port == 0) {
struct servent *s;
@@ -888,12 +888,12 @@ add(ac,av)
if (s != NULL)
rule.fw_divert_port = ntohs(s->s_port);
else
- show_usage("illegal divert port");
+ show_usage("illegal %s port", "divert");
}
} else if (!strncmp(*av,"tee",strlen(*av))) {
rule.fw_flg |= IP_FW_F_TEE; av++; ac--;
if (!ac)
- show_usage("missing divert port");
+ show_usage("missing %s port", "tee divert");
rule.fw_divert_port = strtoul(*av, NULL, 0); av++; ac--;
if (rule.fw_divert_port == 0) {
struct servent *s;
@@ -902,8 +902,11 @@ add(ac,av)
if (s != NULL)
rule.fw_divert_port = ntohs(s->s_port);
else
- show_usage("illegal divert port");
+ show_usage("illegal %s port", "tee divert");
}
+#ifndef IPFW_TEE_IS_FINALLY_IMPLEMENTED
+ err(EX_USAGE, "the ``tee'' action is not implemented");
+#endif
} else if (!strncmp(*av,"fwd",strlen(*av)) ||
!strncmp(*av,"forward",strlen(*av))) {
struct in_addr dummyip;
OpenPOWER on IntegriCloud