X-Git-Url: http://git.sameswireless.fr/l2tpns.git/blobdiff_plain/4b259db0af5f85f423dd75292434bc65832078ea..7484eaf31b4f574691c851e75671775c815e6fc4:/l2tpns.c diff --git a/l2tpns.c b/l2tpns.c index 51aec99..455c99e 100644 --- a/l2tpns.c +++ b/l2tpns.c @@ -4,7 +4,7 @@ // Copyright (c) 2002 FireBrick (Andrews & Arnold Ltd / Watchfront Ltd) - GPL licenced // vim: sw=8 ts=8 -char const *cvs_id_l2tpns = "$Id: l2tpns.c,v 1.15 2004/07/12 15:16:27 bodea Exp $"; +char const *cvs_id_l2tpns = "$Id: l2tpns.c,v 1.17 2004/07/28 04:01:12 fred_nerk Exp $"; #include #include @@ -100,6 +100,8 @@ struct config_descriptt config_values[] = { CONFIG("save_state", save_state, BOOL), CONFIG("primary_radius", radiusserver[0], IP), CONFIG("secondary_radius", radiusserver[1], IP), + CONFIG("primary_radius_port",radiusport[0], SHORT), + CONFIG("secondary_radius_port",radiusport[1], SHORT), CONFIG("radius_accounting", radius_accounting, BOOL), CONFIG("radius_secret", radiussecret, STRING), CONFIG("bind_address", bind_address, IP), @@ -1557,6 +1559,8 @@ void processudp(u8 * buf, int len, struct sockaddr_in *addr) memcpy(calling, b, (n >= MAXTEL) ? (MAXTEL-1) : n); log(4, ntohl(addr->sin_addr.s_addr), s, t, " Calling <%s>\n", calling); break; + case 23: // subtype + break; case 24: // tx connect speed if (n == 4) { @@ -3325,7 +3329,21 @@ void update_config() // Update radius config->numradiusservers = 0; for (i = 0; i < MAXRADSERVER; i++) - if (config->radiusserver[i]) config->numradiusservers++; + if (config->radiusserver[i]) + { + config->numradiusservers++; + // Set radius port: if not set, take the port from the + // first radius server. For the first radius server, + // take the #defined default value from l2tpns.h + + // test twice, In case someone works with + // a secondary radius server without defining + // a primary one, this will work even then. + if (i>0 && !config->radiusport[i]) + config->radiusport[i] = config->radiusport[i-1]; + if (!config->radiusport[i]) + config->radiusport[i] = RADPORT; + } if (!config->numradiusservers) {