Hi all,<div>I need a backup radius server when <span style="font-family:arial, sans-serif">necessary. So I checked my hostapd code(0.7.2) and found out that server list is stored in the struct named<font color="#ff0000"> hostapd_radius_server</font>. When doing the initial work, hostapd uses a timer to get the legal server in the list by counting the retry time.</span></div>
<div><div style="font-family:arial, sans-serif">/**</div><div style="font-family:arial, sans-serif"> * RADIUS_CLIENT_NUM_FAILOVER - RADIUS client failover point</div><div style="font-family:arial, sans-serif"> *</div>
<div style="font-family:arial, sans-serif"> * The number of failed retry attempts after which the RADIUS server will be</div><div style="font-family:arial, sans-serif"> * changed (if one of more backup servers are configured).</div>
<div style="font-family:arial, sans-serif"> */</div><div><font face="arial, sans-serif" color="#ff0000">#define RADIUS_CLIENT_NUM_FAILOVER 4</font></div></div><div><div><font face="arial, sans-serif">static void radius_client_timer(void *eloop_ctx, void *timeout_ctx)</font></div>
<div><font face="arial, sans-serif">{</font></div><div><font face="arial, sans-serif"> ·········· </font></div><div><font face="arial, sans-serif"><span style="white-space:pre-wrap">        </span>while (entry) {</font></div>
<div><font face="arial, sans-serif"><span style="white-space:pre-wrap">                </span>if (now.sec >= entry->next_try &&</font></div><div><font face="arial, sans-serif"><span style="white-space:pre-wrap">                </span> radius_client_retransmit(radius, entry, now.sec)) {</font></div>
<div><font face="arial, sans-serif"><span style="white-space:pre-wrap">                        </span>if (prev)</font></div><div><font face="arial, sans-serif"><span style="white-space:pre-wrap">                                </span>prev->next = entry->next;</font></div>
<div><font face="arial, sans-serif"><span style="white-space:pre-wrap">                        </span>else</font></div><div><font face="arial, sans-serif"><span style="white-space:pre-wrap">                                </span>radius->msgs = entry->next;</font></div>
<div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif"><span style="white-space:pre-wrap">                        </span>tmp = entry;</font></div>
<div><font face="arial, sans-serif"><span style="white-space:pre-wrap">                        </span>entry = entry->next;</font></div><div><font face="arial, sans-serif"><span style="white-space:pre-wrap">                        </span>radius_client_msg_free(tmp);</font></div>
<div><font face="arial, sans-serif"><span style="white-space:pre-wrap">                        </span>radius->num_msgs--;</font></div><div><font face="arial, sans-serif"><span style="white-space:pre-wrap">                        </span>continue;</font></div>
<div><font face="arial, sans-serif"><span style="white-space:pre-wrap">                </span>}</font></div><div><font face="arial, sans-serif"><span style="white-space:pre-wrap">                </span>if (<font color="#ff0000">entry->attempts > RADIUS_CLIENT_NUM_FAILOVER</font>) {</font></div>
<div><font face="arial, sans-serif"><span style="white-space:pre-wrap">                        </span>if (entry->msg_type == RADIUS_ACCT ||</font></div><div><font face="arial, sans-serif"><span style="white-space:pre-wrap">                        </span> entry->msg_type == RADIUS_ACCT_INTERIM)</font></div>
<div><font face="arial, sans-serif"><span style="white-space:pre-wrap">                                </span>acct_failover++;</font></div><div><font face="arial, sans-serif"><span style="white-space:pre-wrap">                        </span>else</font></div>
<div><font face="arial, sans-serif"><span style="white-space:pre-wrap">                                </span>auth_failover++;</font></div><div><font face="arial, sans-serif"><span style="white-space:pre-wrap">                </span>}</font></div>
</div><div><font face="arial, sans-serif">`````````````</font></div><div><font face="arial, sans-serif">}</font></div><div><font face="arial, sans-serif">But in my situation, the </font><span style="color:rgb(255, 0, 0);font-family:arial, sans-serif">RADIUS_CLIENT_NUM_FAILOVER </span><span style="font-family:arial, sans-serif">maybe too big here, </span><span style="font-family:arial, sans-serif">Especially the server list </span><span style="font-family:arial, sans-serif;white-space:nowrap">includes both authen servers & accounting servers.But I can't <span style="font-family:Arial;line-height:24px;white-space:normal">figure out</span> </span><span style="font-family:arial, sans-serif">the most appropriate num.</span><span style="font-family:arial, sans-serif"><span title="点击可显示其他翻译">I don't know</span> <span title="点击可显示其他翻译">on this issue</span> <span title="点击可显示其他翻译">is</span> <span title="点击可显示其他翻译">the neglect of something</span><span title="点击可显示其他翻译">,</span> <span title="点击可显示其他翻译">or is this</span> <span title="点击可显示其他翻译">just an</span> <span title="点击可显示其他翻译">environmental problem.<font size="4" color="#ff0000">Please someone give me a help!!</font></span></span></div>
<div><span style="font-family:arial, sans-serif"><span title="点击可显示其他翻译"><font size="4" color="#ff0000"><br></font></span></span></div>
<div><span style="font-family:arial, sans-serif"><span title="点击可显示其他翻译">Thanks,</span></span></div><div><span style="font-family:arial, sans-serif"><span title="点击可显示其他翻译">Calex</span></span></div>