X-Git-Url: http://git.sameswireless.fr/l2tpns.git/blobdiff_plain/a415c8e5f6d283c1b9582b4c52d9deab4f72d672..c450bdccc0e204223543b305c862e85db572411e:/garden.c?ds=sidebyside diff --git a/garden.c b/garden.c index de7fcc0..07f1f41 100644 --- a/garden.c +++ b/garden.c @@ -9,7 +9,7 @@ /* walled garden */ -char const *cvs_id = "$Id: garden.c,v 1.21 2005-03-10 03:31:25 bodea Exp $"; +char const *cvs_id = "$Id: garden.c,v 1.23 2005-06-02 11:32:30 bodea Exp $"; int plugin_api_version = PLUGIN_API_VERSION; static struct pluginfuncs *p = 0; @@ -206,8 +206,10 @@ int garden_session(sessiont *s, int flag, char *newuser) p->sessionkill(other, "Duplicate session when user released from walled garden"); } /* Clean up counters */ - s->cin = s->cout = 0; s->pin = s->pout = 0; + s->cin = s->cout = 0; + s->cin_delta = s->cout_delta = 0; + s->cin_wrap = s->cout_wrap = 0; snprintf(cmd, sizeof(cmd), "iptables -t nat -D garden_users -s %s -j garden", p->fmtaddr(htonl(s->ip), 0)); p->log(3, sess, s->tunnel, "%s\n", cmd); @@ -223,7 +225,7 @@ int garden_session(sessiont *s, int flag, char *newuser) { /* OK, we're up! */ uint16_t r = p->radiusnew(p->get_id_by_session(s)); - p->radiussend(r, RADIUSSTART); + if (r) p->radiussend(r, RADIUSSTART); } }