summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2009-05-21 19:35:10 +0000
committerFelix Fietkau <nbd@openwrt.org>2009-05-21 19:35:10 +0000
commit6eef580c7ef4f9b32bd95029767e2bf8941a76b7 (patch)
treedcb06e2219ae5568d4f315d5afc6870cf300f86b /target
parentd4e02b91d79e5b45f3449164a2bc15a7e901018c (diff)
downloadmtk-20170518-6eef580c7ef4f9b32bd95029767e2bf8941a76b7.zip
mtk-20170518-6eef580c7ef4f9b32bd95029767e2bf8941a76b7.tar.gz
mtk-20170518-6eef580c7ef4f9b32bd95029767e2bf8941a76b7.tar.bz2
brcm-2.4: potential fix for pptp nat
SVN-Revision: 15970
Diffstat (limited to 'target')
-rw-r--r--target/linux/generic-2.4/patches/625-netfilter_nat_pptp_fix.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/target/linux/generic-2.4/patches/625-netfilter_nat_pptp_fix.patch b/target/linux/generic-2.4/patches/625-netfilter_nat_pptp_fix.patch
new file mode 100644
index 0000000..c65c961
--- /dev/null
+++ b/target/linux/generic-2.4/patches/625-netfilter_nat_pptp_fix.patch
@@ -0,0 +1,53 @@
+--- a/net/ipv4/netfilter/ip_conntrack_pptp.c
++++ b/net/ipv4/netfilter/ip_conntrack_pptp.c
+@@ -134,12 +134,11 @@ static int pptp_expectfn(struct ip_connt
+ }
+
+ /* timeout GRE data connections */
+-static int pptp_timeout_related(struct ip_conntrack *ct)
++static int pptp_timeout_related(struct ip_conntrack *ct, const struct iphdr *iph)
+ {
+ struct list_head *cur_item, *next;
+ struct ip_conntrack_expect *exp;
+ enum ip_conntrack_info ctinfo;
+- struct iphdr *iph;
+
+ /* FIXME: do we have to lock something ? */
+ for (cur_item = ct->sibling_list.next;
+@@ -245,7 +244,8 @@ pptp_inbound_pkt(struct tcphdr *tcph,
+ struct pptp_pkt_hdr *pptph,
+ size_t datalen,
+ struct ip_conntrack *ct,
+- enum ip_conntrack_info ctinfo)
++ enum ip_conntrack_info ctinfo,
++ const struct iphdr *iph)
+ {
+ struct PptpControlHeader *ctlh;
+ union pptp_ctrl_union pptpReq;
+@@ -377,7 +377,7 @@ pptp_inbound_pkt(struct tcphdr *tcph,
+ info->cstate = PPTP_CALL_NONE;
+
+ /* untrack this call id, unexpect GRE packets */
+- pptp_timeout_related(ct);
++ pptp_timeout_related(ct, iph);
+ break;
+
+ case PPTP_WAN_ERROR_NOTIFY:
+@@ -539,7 +539,7 @@ conntrack_pptp_help(const struct iphdr *
+ info->cstate = PPTP_CALL_NONE;
+
+ /* untrack this call id, unexpect GRE packets */
+- pptp_timeout_related(ct);
++ pptp_timeout_related(ct, iph);
+ }
+
+
+@@ -571,7 +571,7 @@ conntrack_pptp_help(const struct iphdr *
+ ret = pptp_outbound_pkt(tcph, pptph, datalen, ct, ctinfo);
+ else
+ /* server -> client (PAC -> PNS) */
+- ret = pptp_inbound_pkt(tcph, pptph, datalen, ct, ctinfo);
++ ret = pptp_inbound_pkt(tcph, pptph, datalen, ct, ctinfo, iph);
+ DEBUGP("sstate: %d->%d, cstate: %d->%d\n",
+ oldsstate, info->sstate, oldcstate, info->cstate);
+ UNLOCK_BH(&ip_pptp_lock);