#18197: Chaos Calmer r43006 Wpa2-EAP RADIUS No accounting server configured
-----------------------+------------------------
  Reporter:  Kitsufan  |      Owner:  developers
      Type:  defect    |     Status:  new
  Priority:  high      |  Milestone:
 Component:  other     |    Version:  Trunk
Resolution:            |   Keywords:
-----------------------+------------------------

Comment (by chrishanton):

 Hi all, I've been facing the same 'No accounting server configured' issue
 as well.

 This issue seems to be introduced in the pure hostapd-2.2 release version.
 The pure hostapd-2.1 and earlier worked fine.

 The changes in hostapd-2.2 & 2.3 does organize/consolidate the radius
 client code better, just that this issue of post-startup RADIUS server re-
 connection attempt might have been missed.

 I've found a way to return to hostapd's former behaviour, though it may
 not be the best/ideal solution for this.

 As am not an OpenWRT hostapd flavoured user (I use hostapd in its pure
 form), am uncertain of the proper manner to submit a OpenWRT patch
 suggestion.

 However, I did notice at quick glance of OpenWRT svn that
 'trunk/package/network/services/hostapd/Makefile' states
 "PKG_VERSION:=2014-10-25".
 Since this date is close to the hostapd-2.3 stable release date of
 2014-10-09, am guessing OpenWRT is using the hostapd-2.3 base (haven't
 actually fetched any code to verify :) )

 Hence am attaching a diff patch output of the changes needed in the pure
 hostapd-2.3 within the 'src/radius/radius_client.c' file as follows:
 ------------------
 diff -crB wpa-2.3/src/radius/radius_client.c
 wpa-2.3_patch/src/radius/radius_client.c
 *** wpa-2.3/src/radius/radius_client.c  Thu Oct  9 14:41:31 2014
 --- wpa-2.3_patch/src/radius/radius_client.c    Mon Jan 12 01:17:14 2015
 ***************
 *** 658,664 ****
         }

         if (msg_type == RADIUS_ACCT || msg_type == RADIUS_ACCT_INTERIM) {
 !               if (conf->acct_server == NULL || radius->acct_sock < 0) {
                         hostapd_logger(radius->ctx, NULL,
                                        HOSTAPD_MODULE_RADIUS,
                                        HOSTAPD_LEVEL_INFO,
 --- 658,664 ----
         }

         if (msg_type == RADIUS_ACCT || msg_type == RADIUS_ACCT_INTERIM) {
 !               if (conf->acct_server == NULL) {
                         hostapd_logger(radius->ctx, NULL,
                                        HOSTAPD_MODULE_RADIUS,
                                        HOSTAPD_LEVEL_INFO,
 ***************
 *** 672,678 ****
                 s = radius->acct_sock;
                 conf->acct_server->requests++;
         } else {
 !               if (conf->auth_server == NULL || radius->auth_sock < 0) {
                         hostapd_logger(radius->ctx, NULL,
                                        HOSTAPD_MODULE_RADIUS,
                                        HOSTAPD_LEVEL_INFO,
 --- 672,678 ----
                 s = radius->acct_sock;
                 conf->acct_server->requests++;
         } else {
 !               if (conf->auth_server == NULL) {
                         hostapd_logger(radius->ctx, NULL,
                                        HOSTAPD_MODULE_RADIUS,
                                        HOSTAPD_LEVEL_INFO,


 -----------------
 Think Christian Suenkenberg's summary is accurate in that
 ''radius_change_server()'' is not setting the ''radius->auth_sock''.
 It never retries because a valid radius->auth_sock is now a conditional
 parameter for the radius client to send a radius packet to the server
 within ''radius_client_send()'' (also displayed in the patch above).

 With the above patch in force in pure hostapd-2.3, on first attempt of
 sending a radius packet through the socket (at the end of
 ''radius_client_send()''), it would probably fail since it relies on the
 still initialized (-1) radius->auth_sock, thus triggering
 ''radius_client_handle_send_error()'' to run, which should then trigger
 ''radius_change_server()'' to run again (successfully this time), and
 things will work when the next time the radius packet is retransmitted.

 This is what I roughly understand is going on, and the patch suggestion
 should functionally replicate how hostapd (2.1 & earlier) previously
 worked.

 Perhaps how to proceed further is best left to the good judgement/analysis
 of other OpenWRT/hostapd developers :)

--
Ticket URL: <https://dev.openwrt.org/ticket/18197#comment:4>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets

Reply via email to