p.log(3, 0, 0, 0, "Walled Garden allowing login\n");
data->auth_allowed = 1;
- data->s->garden = 1;
+ data->s->walled_garden = 1;
return PLUGIN_RET_OK;
}
int plugin_new_session(struct param_new_session *data)
{
- if (data->s->garden) garden_session(data->s, 1);
+ if (data->s->walled_garden) garden_session(data->s, 1);
return PLUGIN_RET_OK;
}
int plugin_kill_session(struct param_new_session *data)
{
- if (data->s->garden) garden_session(data->s, 0);
+ if (data->s->walled_garden) garden_session(data->s, 0);
return PLUGIN_RET_OK;
}
sprintf((data->response + data->response_length), "%s", errormsg);
data->response_length += strlen(errormsg) + 1;
- p.log(3, 0, 0, 0, "Unknown session %s\n", session);
+ p.log(3, 0, 0, 0, "Unknown session %d\n", session);
return PLUGIN_RET_STOP;
}
*(short *)(data->response + 2) = ntohs(PKT_RESP_OK);
snprintf(cmd, 2048, "iptables -t nat -A garden_users -s %s -j garden", p.inet_toa(ntohl(s->ip)));
p.log(3, 0, 0, s->tunnel, "%s\n", cmd);
system(cmd);
- s->garden = 1;
+ s->walled_garden = 1;
}
else
{
if (WEXITSTATUS(status) != 0) break;
}
- s->garden = 0;
+ s->walled_garden = 0;
if (!s->die) {
/* OK, we're up! */
- u8 r = p.radiusnew(p.get_id_by_session(s));
+ u16 r = p.radiusnew(p.get_id_by_session(s));
p.radiussend(r, RADIUSSTART);
}
}
- s->garden = flag;
+ s->walled_garden = flag;
return 1;
}