OSDN Git Service

Revert "firewall4: disable ipv6 fullcone nat"
authorZiMing Mo <msylgj@immortalwrt.org>
Tue, 10 May 2022 15:31:31 +0000 (23:31 +0800)
committerZiMing Mo <msylgj@immortalwrt.org>
Tue, 10 May 2022 15:34:18 +0000 (23:34 +0800)
This reverts commit 308317f29af47ab4867d4e969a2826e6d2a8097d.

Fixed by a60a51b5b6d21efeed9e61f4ea4819737c4390f9

Signed-off-by: ZiMing Mo <msylgj@immortalwrt.org>
package/network/config/firewall4/patches/001-firewall4-add-support-for-fullcone-nat.patch

index 205d67c..78a2079 100644 (file)
@@ -11,10 +11,10 @@ invalid
 Renew: ZiMing Mo <msylgj@immortalwrt.org>
 ---
  root/etc/config/firewall                      |  1 +
- root/usr/share/firewall4/templates/ruleset.uc | 11 +++++-
+ root/usr/share/firewall4/templates/ruleset.uc | 13 +++++-
  .../firewall4/templates/zone-fullcone.uc      |  4 ++
  root/usr/share/ucode/fw4.uc                   | 38 ++++++++++++++++++-
- 4 files changed, 52 insertions(+), 2 deletions(-)
+ 4 files changed, 53 insertions(+), 3 deletions(-)
  create mode 100644 root/usr/share/firewall4/templates/zone-fullcone.uc
 
 --- a/root/etc/config/firewall
@@ -57,7 +57,8 @@ Renew: ZiMing Mo <msylgj@immortalwrt.org>
  {%     endfor %}
  {%    endfor %}
  {%   endif %}
- {%   if (zone.masq6): %}
+-{%   if (zone.masq6): %}
++{%   if (zone.masq6 && !fw4.default_option("fullcone")): %}
  {%    for (let saddrs in zone.masq6_src_subnets): %}
  {%     for (let daddrs in zone.masq6_dest_subnets): %}
                {%+ include("zone-masq.uc", { fw4, zone, family: 6, saddrs, daddrs }) %}
@@ -75,9 +76,9 @@ Renew: ZiMing Mo <msylgj@immortalwrt.org>
 +++ b/root/usr/share/firewall4/templates/zone-fullcone.uc
 @@ -0,0 +1,4 @@
 +{# /usr/share/firewall4/templates/zone-fullcone.uc #}
-+              meta nfproto ipv4 fullcone comment "!fw4: Handle {{
++              fullcone comment "!fw4: Handle {{
 +              zone.name
-+}} IPv4 fullcone NAT traffic"
++}} IPv4/IPv6 fullcone NAT traffic"
 --- a/root/usr/share/ucode/fw4.uc
 +++ b/root/usr/share/ucode/fw4.uc
 @@ -1,3 +1,5 @@