X-Git-Url: http://git.sameswireless.fr/l2tpns.git/blobdiff_plain/890bffb510b300b8ed55357c6d9e99f1c6de22e9..df35f4d66fd01268fe4456994368b76a541acec4:/garden.c?ds=sidebyside diff --git a/garden.c b/garden.c index a023399..0b7d763 100644 --- a/garden.c +++ b/garden.c @@ -3,14 +3,15 @@ #include #include #include +#include +#include + #include "l2tpns.h" #include "plugin.h" #include "control.h" /* walled garden */ -char const *cvs_id = "$Id: garden.c,v 1.24 2005-10-11 09:04:53 bodea Exp $"; - int plugin_api_version = PLUGIN_API_VERSION; static struct pluginfuncs *f = 0; @@ -23,7 +24,8 @@ char *up_commands[] = { "iptables -t nat -N garden_users >/dev/null 2>&1", // Empty chain, users added/removed by garden_session "iptables -t nat -F garden_users", "iptables -t nat -A PREROUTING -j garden_users", // DNAT any users on the garden_users chain - "sysctl -w net.ipv4.ip_conntrack_max=512000 >/dev/null", // lots of entries + "sysctl -w net.ipv4.netfilter.ip_conntrack_max=512000" // lots of entries + " net.ipv4.netfilter.ip_conntrack_tcp_timeout_established=18000 >/dev/null", // 5hrs NULL, }; @@ -220,7 +222,7 @@ int garden_session(sessiont *s, int flag, char *newuser) /* Clean up counters */ s->pin = s->pout = 0; s->cin = s->cout = 0; - s->cin_delta = s->cout_delta = 0; + s->cin_delta = s->cout_delta = s->coutgrp_delta = 0; s->cin_wrap = s->cout_wrap = 0; snprintf(cmd, sizeof(cmd),