Re: hostapd + freeRadius accounting
Andreas Wetzel <mickey242 <at> gmx.net>
2007-07-04 20:08:11 GMT
Jouni Malinen wrote:
> On Wed, Jul 04, 2007 at 08:06:13PM +0200, Andreas Wetzel wrote:
>> I've installed hostapd and freeRadius on a FreeBSD 6.2-RELEASE machine.
>> The NAS-Port attribute that hostapd sends in the RADIUS packets happens
>> to always contain a value of 0. Additionally the Acct-Session-Id attribute
>> always contains '00000000-00000000'. This happens with the hostapd 0.4.8 that
>> is included with the FreeBSD release, as well as with v0.5.8.
> NAS-Port is set to the Association ID, if one is available. However, it
> is not available when using FreeBSD which takes care of IEEE 802.11
I guess the association ID would be sta->aid, right? The weird part is,
when I insert a printf that outputs sta->aid at the time of association,
I get the following:
1st station associates:
hostapd: ath0: STA 00:19:e0:83:b0:41 IEEE 802.11: associated (aid=1)
2nd station associates:
hostapd: ath0: STA 00:14:78:7d:51:2c IEEE 802.11: associated (aid=32001)
NAS-Port, which seems to use sta->aid though is always 0.
Which part am I missing?
> If it would be important to get this stored (though, I
> don't really see much value for it at the RADIUS server), this would
> need an addition to FreeBSD net80211 to allow the association ID to be
> read (or to make it automatically reported as part of association
freeradius uses a combination of the NAS-IP-Address and the NAS-Port as
the key to store utmp style entries with the radutmp module. With NAS-Port
being always zero, each station that signs on, overwrites the entry of the
> Lack of proper Acct-Session-Id looks like a bug in the FreeBSD driver
> wrapper code. bsd_new_sta() function should call
> accounting_sta_get_id(hapd, sta) in the same way as driver_madwifi.c is
> doing in madwifi_new_sta().
I also tried passing an Acct-Session-Id in the Access-Accept message to
hostapd, but that is ignored by hostapd.
Keep it icy man.
I don't want to end up a corpse before my time because you were daydreaming.