Revert "fix fullcone nat udp ifdex stauts"

This reverts commit 21b7a85068.
This commit is contained in:
coolsnowwolf 2018-11-14 15:41:26 +08:00
parent 21b7a85068
commit 174d5713ee
2 changed files with 2 additions and 48 deletions

View File

@ -10,11 +10,11 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=fullconenat
PKG_VERSION:=1.0
PKG_RELEASE:=5
PKG_RELEASE:=4
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/Chion82/netfilter-full-cone-nat.git
PKG_SOURCE_VERSION:=bc3fb32f3ff8facebad65dfbd12a64bf9b9276f4
PKG_SOURCE_VERSION:=ec14efee249ef11409827a87d6a23dd53deb5149
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=LICENSE

View File

@ -1,46 +0,0 @@
From 9435c0e186aa9eadc0b7603024e2abf7842923c4 Mon Sep 17 00:00:00 2001
From: tingjunli <815314486@qq.com>
Date: Wed, 7 Nov 2018 10:58:20 +0800
Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E5=90=8E=E4=B8=A4=E6=AC=A1SNAT?=
=?UTF-8?q?=E5=87=BA=E6=8E=A5=E5=8F=A3=E5=8F=98=E5=8C=96=E5=90=8E=EF=BC=8C?=
=?UTF-8?q?CT=E8=A1=A8=E6=97=A0=E6=B3=95=E5=8F=8A=E6=97=B6=E5=88=A0?=
=?UTF-8?q?=E9=99=A4=E5=A4=B1=E6=95=88=E7=9A=84=E8=B7=9F=E8=B8=AA=E8=BF=9E?=
=?UTF-8?q?=E6=8E=A5=EF=BC=8C=E5=AF=BC=E8=87=B4NAT=E4=BC=9A=E8=AF=9D?=
=?UTF-8?q?=E5=A4=B1=E8=B4=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
xt_FULLCONENAT.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/xt_FULLCONENAT.c b/xt_FULLCONENAT.c
index 9e52eba..595e766 100644
--- a/xt_FULLCONENAT.c
+++ b/xt_FULLCONENAT.c
@@ -467,6 +467,7 @@ static unsigned int fullconenat_tg(struct sk_buff *skb, const struct xt_action_p
struct nf_conn *ct;
enum ip_conntrack_info ctinfo;
struct nf_conntrack_tuple *ct_tuple, *ct_tuple_origin;
+ struct nf_conn_nat *nat;
struct net_device *net_dev;
@@ -496,6 +497,7 @@ static unsigned int fullconenat_tg(struct sk_buff *skb, const struct xt_action_p
ct = nf_ct_get(skb, &ctinfo);
net = nf_ct_net(ct);
zone = nf_ct_zone(ct);
+ nat = nfct_nat(ct);
memset(&newrange.min_addr, 0, sizeof(newrange.min_addr));
memset(&newrange.max_addr, 0, sizeof(newrange.max_addr));
@@ -590,6 +592,8 @@ static unsigned int fullconenat_tg(struct sk_buff *skb, const struct xt_action_p
}
}
+ nat->masq_index = ifindex;
+
new_ip = get_device_ip(skb->dev);
newrange.min_addr.ip = new_ip;
newrange.max_addr.ip = new_ip;