summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_fw.h
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2011-08-20 17:05:11 +0000
committerbz <bz@FreeBSD.org>2011-08-20 17:05:11 +0000
commiteccbdd061bd53b771dcd87b1708dfbc43cfb72a7 (patch)
treef3e27acb3ae7873708cae6d77a7b90d7a8d9e68c /sys/netinet/ip_fw.h
parentfa01a4aee0c4b294791a3b7515a6776750af5f04 (diff)
downloadFreeBSD-src-eccbdd061bd53b771dcd87b1708dfbc43cfb72a7.zip
FreeBSD-src-eccbdd061bd53b771dcd87b1708dfbc43cfb72a7.tar.gz
Add support for IPv6 to ipfw fwd:
Distinguish IPv4 and IPv6 addresses and optional port numbers in user space to set the option for the correct protocol family. Add support in the kernel for carrying the new IPv6 destination address and port. Add support to TCP and UDP for IPv6 and fix UDP IPv4 to not change the address in the IP header. Add support for IPv6 forwarding to a non-local destination. Add a regession test uitilizing VIMAGE to check all 20 possible combinations I could think of. Obtained from: David Dolson at Sandvine Incorporated (original version for ipfw fwd IPv6 support) Sponsored by: Sandvine Incorporated PR: bin/117214 MFC after: 4 weeks Approved by: re (kib)
Diffstat (limited to 'sys/netinet/ip_fw.h')
-rw-r--r--sys/netinet/ip_fw.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/netinet/ip_fw.h b/sys/netinet/ip_fw.h
index ff3a67f..f6f8fcd 100644
--- a/sys/netinet/ip_fw.h
+++ b/sys/netinet/ip_fw.h
@@ -203,6 +203,8 @@ enum ipfw_opcodes { /* arguments (4 byte each) */
O_CALLRETURN, /* arg1=called rule number */
+ O_FORWARD_IP6, /* fwd sockaddr_in6 */
+
O_LAST_OPCODE /* not an opcode! */
};
@@ -299,6 +301,14 @@ typedef struct _ipfw_insn_sa {
} ipfw_insn_sa;
/*
+ * This is used to forward to a given address (ipv6).
+ */
+typedef struct _ipfw_insn_sa6 {
+ ipfw_insn o;
+ struct sockaddr_in6 sa;
+} ipfw_insn_sa6;
+
+/*
* This is used for MAC addr-mask pairs.
*/
typedef struct _ipfw_insn_mac {
OpenPOWER on IntegriCloud