[OpenWrt-Devel] [PATCH] [package] firewall: Adds support for IPv6 DNAT, SNAT, and REDIRECT

Timothy Ace openwrt.org-1 at timothyace.com
Thu Aug 13 13:58:51 EDT 2015


From: Timothy Ace <openwrt.org-1 at timothyace.com>

Adds support for IPv6 DNAT, SNAT, and REDIRECT.

Signed-off-by: Timothy Ace <openwrt.org-1 at timothyace.com>
---
This is a git patch for the firewall3 git repo at git://nbd.name/firewall3.git

Note1: Luci updates still need to be made in a separate patch to support IPv6 address entry on the port forwards page, but this works using manual entries in /etc/config/firewall for now.

Note2: I changed the section in compare_addr() from this:

-	return ((a->address.v4.s_addr & a->mask.v4.s_addr) ==
-	        (b->address.v4.s_addr & a->mask.v4.s_addr));

to this:

+	return ((a->address.v4.s_addr & a->mask.v4.s_addr) ==
+	        (b->address.v4.s_addr & b->mask.v4.s_addr));

... because using "a->mask" instead of "b->mask" on the second line looked wrong to me. Please let me know if that was intentional and I'll re-submit a patch that accounts for that change for the v4 and new v6 sections.




More information about the openwrt-devel mailing list