X-Git-Url: http://git.sameswireless.fr/l2tpns.git/blobdiff_plain/a685501f6432b2cd8cd23ced906abcb2d2ce862f..bda0151354ac2fbeff56ba8c934d1c3de6cc1898:/radius.c diff --git a/radius.c b/radius.c index c2474e3..690380f 100644 --- a/radius.c +++ b/radius.c @@ -1,6 +1,6 @@ // L2TPNS Radius Stuff -char const *cvs_id_radius = "$Id: radius.c,v 1.34 2005-06-28 14:48:28 bodea Exp $"; +char const *cvs_id_radius = "$Id: radius.c,v 1.36 2005-06-30 14:31:26 bodea Exp $"; #include #include @@ -798,18 +798,6 @@ void processdae(uint8_t *buf, int len, struct sockaddr_in *addr, int alen) uint8_t *p; LOG(3, 0, 0, "DAE request from %s\n", fmtaddr(addr->sin_addr.s_addr, 0)); - - // check if DAE is from RADIUS server - for (i = 0; i < config->numradiusservers; i++) - if (config->radiusserver[i] == addr -> sin_addr.s_addr) - break; - - if (i >= config->numradiusservers) - { - LOG(1, 0, 0, "Unknown DAE client %s\n", fmtaddr(addr->sin_addr.s_addr, 0)); - return; - } - LOG_HEX(5, "DAE Request", buf, len); if (len < 20 || len < ntohs(*(uint16_t *) (buf + 2))) @@ -1027,20 +1015,17 @@ void processdae(uint8_t *buf, int len, struct sockaddr_in *addr, int alen) } // apply filters - if (fin != -1 || fout != -1) - { - if (fin == -1) - fin = 0; - else - LOG(3, s, t, " Filter in %d (%s)\n", fin, ip_filters[fin - 1].name); + if (fin == -1) + fin = 0; + else + LOG(3, s, t, " Filter in %d (%s)\n", fin, ip_filters[fin - 1].name); - if (fout == -1) - fout = 0; - else - LOG(3, s, t, " Filter out %d (%s)\n", fout, ip_filters[fout - 1].name); + if (fout == -1) + fout = 0; + else + LOG(3, s, t, " Filter out %d (%s)\n", fout, ip_filters[fout - 1].name); - filter_session(s, fin, fout); - } + filter_session(s, fin, fout); // process cisco av-pair(s) for (i = 0; i < avp; i++)