Called-Station-Id - why IP instead of MAC?
-
I'm trying to move from m0n0wall to pfsense for several hotspot installations. I'm using radius authentication, and pfSense 2.0 beta (from a couple days ago).
m0n0wall by default sends the WAN mac address as Called-Station-Id, and the client's MAC address as Calling-Station-Id. This works great, because I can filter our reports by that, and the mac address of the router never (unless hardware dies) changes.
pfSense on the other hand sends the WAN IP address. Which can change frequently (I have little control over the internet connection these are connected to. It's not always a static IP.)
Is there a reason this change was made? I also notice if using PPPoE, the WAN interface shows all 0's for the mac address. m0n0wall uses the mac address of the physical interface.
My solution has been to hack in another option for "Type". I had to use the wireless card's MAC address since I can't get the WAN one easily, but it works. Any chance of making this an option in the normal builds?
In /usr/local/captiveportalk/radius_authentication.inc:
switch($radiusvendor) { case 'cisco': $calledstationid = $clientmac; $callingstationid = $clientip; break; + case 'custom': + $calledstationid = mac_format(get_interface_mac(get_real_interface("ath0"))); + $callingstationid = $clientmac; + break;
Two similar changes to radius_accounting.inc
In /usr/local/www/services_captiveportal.php:
- $radiusvendors = array("cisco"); + $radiusvendors = array("cisco","custom");