uint16_t asession = 0; // assigned session
uint32_t amagic = 0; // magic number
uint8_t aflags = 0; // flags from last LCF
uint16_t version = 0x0100; // protocol version (we handle 0.0 as well and send that back just in case)
uint16_t asession = 0; // assigned session
uint32_t amagic = 0; // magic number
uint8_t aflags = 0; // flags from last LCF
uint16_t version = 0x0100; // protocol version (we handle 0.0 as well and send that back just in case)
{
uint16_t atype = ntohs(*(uint16_t *)b);
LOG(4, s, t, " Proxy Auth Type %d (%s)\n", atype, auth_type(atype));
{
uint16_t atype = ntohs(*(uint16_t *)b);
LOG(4, s, t, " Proxy Auth Type %d (%s)\n", atype, auth_type(atype));
else if (*p == 7) // Protocol-Field-Compression
aflags |= SESSIONPFC;
else if (*p == 8) // Address-and-Control-Field-Compression
else if (*p == 7) // Protocol-Field-Compression
aflags |= SESSIONPFC;
else if (*p == 8) // Address-and-Control-Field-Compression
session[s].l2tp_flags = aflags; // set flags received
LOG(3, s, t, "Magic %X Flags %X\n", amagic, aflags);
controlnull(t); // ack
session[s].l2tp_flags = aflags; // set flags received
LOG(3, s, t, "Magic %X Flags %X\n", amagic, aflags);
controlnull(t); // ack
- // In CHAP state, request PAP instead
- if (requestchap)
- initlcp(t, s);
+ // proxy authentication type is not supported
+ if (authtype && !(config->radius_authtypes & authtype))
+ sendlcp(t, s, config->radius_authprefer);
// test twice, In case someone works with
// a secondary radius server without defining
// a primary one, this will work even then.
// test twice, In case someone works with
// a secondary radius server without defining
// a primary one, this will work even then.
config->radiusport[i] = config->radiusport[i-1];
if (!config->radiusport[i])
config->radiusport[i] = RADPORT;
config->radiusport[i] = config->radiusport[i-1];
if (!config->radiusport[i])
config->radiusport[i] = RADPORT;
// parse radius_authtypes_s
config->radius_authtypes = config->radius_authprefer = 0;
p = config->radius_authtypes_s;
// parse radius_authtypes_s
config->radius_authtypes = config->radius_authprefer = 0;
p = config->radius_authtypes_s;
config->radius_authtypes |= type;
if (!config->radius_authprefer)
config->radius_authprefer = type;
config->radius_authtypes |= type;
if (!config->radius_authprefer)
config->radius_authprefer = type;