Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 34735
b: refs/heads/master
c: 4c5de69
h: refs/heads/master
i:
  34733: d19ac14
  34731: 6f31f28
  34727: 0c2099d
  34719: 00bbd71
v: v3
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Sep 22, 2006
1 parent 769512e commit 951fd96
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fd5e3befa405ea64d4db6b393b821644bf963c57
refs/heads/master: 4c5de695cf7f71c85ad8cfff509f6475b8bd4d27
2 changes: 2 additions & 0 deletions trunk/include/linux/netfilter_ipv4/ip_conntrack_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ struct ip_conntrack_helper
struct ip_conntrack *ct,
enum ip_conntrack_info conntrackinfo);

void (*destroy)(struct ip_conntrack *ct);

int (*to_nfattr)(struct sk_buff *skb, const struct ip_conntrack *ct);
};

Expand Down
5 changes: 5 additions & 0 deletions trunk/net/ipv4/netfilter/ip_conntrack_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ destroy_conntrack(struct nf_conntrack *nfct)
{
struct ip_conntrack *ct = (struct ip_conntrack *)nfct;
struct ip_conntrack_protocol *proto;
struct ip_conntrack_helper *helper;

DEBUGP("destroy_conntrack(%p)\n", ct);
IP_NF_ASSERT(atomic_read(&nfct->use) == 0);
Expand All @@ -315,6 +316,10 @@ destroy_conntrack(struct nf_conntrack *nfct)
ip_conntrack_event(IPCT_DESTROY, ct);
set_bit(IPS_DYING_BIT, &ct->status);

helper = ct->helper;
if (helper && helper->destroy)
helper->destroy(ct);

/* To make sure we don't get any weird locking issues here:
* destroy_conntrack() MUST NOT be called with a write lock
* to ip_conntrack_lock!!! -HW */
Expand Down
12 changes: 2 additions & 10 deletions trunk/net/ipv4/netfilter/ip_conntrack_helper_pptp.c
Original file line number Diff line number Diff line change
Expand Up @@ -553,15 +553,6 @@ conntrack_pptp_help(struct sk_buff **pskb,
nexthdr_off += tcph->doff * 4;
datalen = tcplen - tcph->doff * 4;

if (tcph->fin || tcph->rst) {
DEBUGP("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);
}

pptph = skb_header_pointer(*pskb, nexthdr_off, sizeof(_pptph), &_pptph);
if (!pptph) {
DEBUGP("no full PPTP header, can't track\n");
Expand Down Expand Up @@ -640,7 +631,8 @@ static struct ip_conntrack_helper pptp = {
.protonum = 0xff
}
},
.help = conntrack_pptp_help
.help = conntrack_pptp_help,
.destroy = pptp_destroy_siblings,
};

extern void ip_ct_proto_gre_fini(void);
Expand Down

0 comments on commit 951fd96

Please sign in to comment.