diff options
author | Kjell Wooding <kjell@cvs.openbsd.org> | 2001-07-01 17:16:04 +0000 |
---|---|---|
committer | Kjell Wooding <kjell@cvs.openbsd.org> | 2001-07-01 17:16:04 +0000 |
commit | 0834bde8262d89fe0a1b8f247c760c2ef2ee40fe (patch) | |
tree | c71dcaa9b2c24e868ed133b741278e6837283cd9 /sys/net/pfvar.h | |
parent | 88de2e0615dc2d5e815c81c7c23d6dd7066bd40d (diff) |
Add port ranges to the rdr directive. Connections can be redirected
to either a range of the same size, or a single port. Redirects
between ranges of different sizes are not supported. Eg:
rdr dc0 10.0.0.0/24 port 60000:61000 -> 127.0.0.1 port 65530:* proto udp
rdr xl0 0.0.0.0/0 port 6660:6669 -> 127.0.0.1 port 6667 proto tcp
This replaces the wildcard port patch (when port = 0), as it should no
longer be necessary. ok dhartmei@
Diffstat (limited to 'sys/net/pfvar.h')
-rw-r--r-- | sys/net/pfvar.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 5c581e8043c..0ca01b88afb 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pfvar.h,v 1.26 2001/06/29 03:09:14 angelos Exp $ */ +/* $OpenBSD: pfvar.h,v 1.27 2001/07/01 17:16:03 kjell Exp $ */ /* * Copyright (c) 2001, Daniel Hartmeier @@ -119,11 +119,17 @@ struct pf_rdr { u_int32_t dmask; u_int32_t raddr; u_int16_t dport; + u_int16_t dport2; u_int16_t rport; u_int8_t proto; u_int8_t not; + u_int8_t opts; }; +/* flags for RDR options */ +#define PF_DPORT_RANGE 0x01 /* Dest port uses range */ +#define PF_RPORT_RANGE 0x02 /* RDR'ed port uses range */ + /* Reasons code for passing/dropping a packet */ #define PFRES_MATCH 0 /* Explicit match of a rule */ #define PFRES_BADOFF 1 /* Bad offset for pull_hdr */ |