summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2007-05-04 11:15:41 +0000
committerbz <bz@FreeBSD.org>2007-05-04 11:15:41 +0000
commitab603b3a9cf7b2e1e960a1f240075673e7e10f6a (patch)
tree6099de4ef237b00b242189adce847b598a6c6dec /sbin
parentfaed9880adbebeea08c68c64f8edd85728de03ec (diff)
downloadFreeBSD-src-ab603b3a9cf7b2e1e960a1f240075673e7e10f6a.zip
FreeBSD-src-ab603b3a9cf7b2e1e960a1f240075673e7e10f6a.tar.gz
Add support for filtering on Routing Header Type 0 and
Mobile IPv6 Routing Header Type 2 in addition to filter on the non-differentiated presence of any Routing Header. MFC after: 3 weeks
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ipfw/ipfw.810
-rw-r--r--sbin/ipfw/ipfw2.c18
2 files changed, 25 insertions, 3 deletions
diff --git a/sbin/ipfw/ipfw.8 b/sbin/ipfw/ipfw.8
index bad7b15..52bb326 100644
--- a/sbin/ipfw/ipfw.8
+++ b/sbin/ipfw/ipfw.8
@@ -1,7 +1,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd July 25, 2006
+.Dd May 4, 2007
.Dt IPFW 8
.Os
.Sh NAME
@@ -456,7 +456,7 @@ Time To Live
.It IP options
.It IPv6 Extension headers
Fragmentation, Hop-by-Hop options,
-source routing, IPSec options.
+Routing Headers, Source routing rthdr0, Mobile IPv6 rthdr2, IPSec options.
.It IPv6 Flow-ID
.It Misc. TCP header fields
TCP flags (SYN, FIN, ACK, RST, etc.),
@@ -1125,8 +1125,12 @@ Fragment,
.Pq Cm frag ,
Hop-to-hop options
.Pq Cm hopopt ,
-Source routing
+any type of Routing Header
.Pq Cm route ,
+Source routing Routing Header Type 0
+.Pq Cm rthdr0 ,
+Mobile IPv6 Routing Header Type 2
+.Pq Cm rthdr2 ,
Destination options
.Pq Cm dstopt ,
IPSec authentication headers
diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c
index 14c707c..bb40006 100644
--- a/sbin/ipfw/ipfw2.c
+++ b/sbin/ipfw/ipfw2.c
@@ -1301,6 +1301,8 @@ static struct _s_x ext6hdrcodes[] = {
{ "dstopt", EXT_DSTOPTS },
{ "ah", EXT_AH },
{ "esp", EXT_ESP },
+ { "rthdr0", EXT_RTHDR0 },
+ { "rthdr2", EXT_RTHDR2 },
{ NULL, 0 }
};
@@ -1341,6 +1343,14 @@ fill_ext6hdr( ipfw_insn *cmd, char *av)
cmd->arg1 |= EXT_ESP;
break;
+ case EXT_RTHDR0:
+ cmd->arg1 |= EXT_RTHDR0;
+ break;
+
+ case EXT_RTHDR2:
+ cmd->arg1 |= EXT_RTHDR2;
+ break;
+
default:
errx( EX_DATAERR, "invalid option for ipv6 exten header" );
break;
@@ -1371,6 +1381,14 @@ print_ext6hdr( ipfw_insn *cmd )
printf("%crouting options", sep);
sep = ',';
}
+ if (cmd->arg1 & EXT_RTHDR0 ) {
+ printf("%crthdr0", sep);
+ sep = ',';
+ }
+ if (cmd->arg1 & EXT_RTHDR2 ) {
+ printf("%crthdr2", sep);
+ sep = ',';
+ }
if (cmd->arg1 & EXT_DSTOPTS ) {
printf("%cdestination options", sep);
sep = ',';
OpenPOWER on IntegriCloud