--- zzzz-none-000/linux-2.6.32.61/net/netfilter/nf_conntrack_pptp.c 2013-06-10 09:43:48.000000000 +0000 +++ ar10-7272-687/linux-2.6.32.61/net/netfilter/nf_conntrack_pptp.c 2011-07-20 07:23:51.000000000 +0000 @@ -503,7 +503,11 @@ { int dir = CTINFO2DIR(ctinfo); +#ifdef CONFIG_PPTP_ALG_FIX + struct nf_ct_pptp_master *info = &nfct_help(ct)->help.ct_pptp_info; +#else const struct nf_ct_pptp_master *info = &nfct_help(ct)->help.ct_pptp_info; +#endif const struct tcphdr *tcph; struct tcphdr _tcph; const struct pptp_pkt_hdr *pptph; @@ -527,6 +531,17 @@ nexthdr_off += tcph->doff * 4; datalen = tcplen - tcph->doff * 4; +#ifdef CONFIG_PPTP_ALG_FIX + if (tcph->fin || tcph->rst) { + pr_debug("RST/FIN received, timeouting GRE\n"); + /* can't do this after real newnat */ + info->cstate = PPTP_CALL_NONE; + /* untrack this call id, unexpect GRE packets */ + pptp_destroy_siblings(ct); + } +#endif + + pptph = skb_header_pointer(skb, nexthdr_off, sizeof(_pptph), &_pptph); if (!pptph) { pr_debug("no full PPTP header, can't track\n");