Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 290816
b: refs/heads/master
c: b888341
h: refs/heads/master
v: v3
  • Loading branch information
Pablo Neira Ayuso committed Mar 7, 2012
1 parent ef80cab commit 7376ec5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 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: 33ee44643f10638f0ce6a96d11e30d1fbe877024
refs/heads/master: b888341c7f33035694f70428d7001d73f0b2a3b1
16 changes: 12 additions & 4 deletions trunk/net/netfilter/nf_conntrack_proto_gre.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,16 @@
#include <linux/netfilter/nf_conntrack_proto_gre.h>
#include <linux/netfilter/nf_conntrack_pptp.h>

#define GRE_TIMEOUT (30 * HZ)
#define GRE_STREAM_TIMEOUT (180 * HZ)
enum grep_conntrack {
GRE_CT_UNREPLIED,
GRE_CT_REPLIED,
GRE_CT_MAX
};

static unsigned int gre_timeouts[GRE_CT_MAX] = {
[GRE_CT_UNREPLIED] = 30*HZ,
[GRE_CT_REPLIED] = 180*HZ,
};

static int proto_gre_net_id __read_mostly;
struct netns_proto_gre {
Expand Down Expand Up @@ -259,8 +267,8 @@ static bool gre_new(struct nf_conn *ct, const struct sk_buff *skb,

/* initialize to sane value. Ideally a conntrack helper
* (e.g. in case of pptp) is increasing them */
ct->proto.gre.stream_timeout = GRE_STREAM_TIMEOUT;
ct->proto.gre.timeout = GRE_TIMEOUT;
ct->proto.gre.stream_timeout = gre_timeouts[GRE_CT_REPLIED];
ct->proto.gre.timeout = gre_timeouts[GRE_CT_UNREPLIED];

return true;
}
Expand Down

0 comments on commit 7376ec5

Please sign in to comment.