<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Means you haven't instantiated your SQL module with the correct instance name.<div><br></div><div>Check that the config block for your SQL is :</div><div><br></div><div>sql sql_local {</div><div><br></div><div>}</div><div><br></div><div>-Arran</div><div><br></div><div><br><div><div>On 25 Aug 2011, at 16:57, Sébastien Barbereau wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi,<div>I am trying to do mac authorization as per <a href="http://wiki.freeradius.org/Mac-Auth#Mac-Auth+authorisation+by+SSID+SQL">http://wiki.freeradius.org/Mac-Auth#Mac-Auth+authorisation+by+SSID+SQL</a></div><div>In fact my attempt is much simpler as I just have a very simple table containing the mac address of system to accept. My conf looks like that:</div>
<div><div><br></div><div>authorize {</div><div>...</div><div> # newer authorized macs</div><div> if("%{sql_local:SELECT COUNT(mac) FROM authorized_macs WHERE mac ='%{Calling-Station-ID}'}" > 0){</div>
<div> update control {</div><div> Auth-Type := Accept</div><div> }</div><div> ok = return</div><div> }</div><div><br></div><div>...</div></div><div>
}</div><div><br></div><div>But when doing an authentication attemp I get the following in the debug logs :</div><div>...</div><div><div>Thu Aug 25 16:52:56 2011 : Info: ++? if (ok) -> FALSE</div><div>Thu Aug 25 16:52:56 2011 : Info: ++? if ("%{sql_local:SELECT COUNT(mac) FROM authorized_macs WHERE mac ='%{Calling-Station-ID}'}" > 0)</div>
<div>Thu Aug 25 16:52:56 2011 : Info: WARNING: Unknown module "sql_local" in string expansion "%"</div><div>Thu Aug 25 16:52:56 2011 : Info: ? Evaluating ("%{sql_local:SELECT COUNT(mac) FROM authorized_macs WHERE mac ='%{Calling-Station-ID}'}" > 0) -> FALSE</div>
<div>Thu Aug 25 16:52:56 2011 : Info: ++? if ("%{sql_local:SELECT COUNT(mac) FROM authorized_macs WHERE mac ='%{Calling-Station-ID}'}" > 0) -> FALSE</div><div>...</div></div><div><br></div><div>As far as I can understand the documentation this should be working (<a href="http://wiki.freeradius.org/Rlm_sql#SQL+xlat">http://wiki.freeradius.org/Rlm_sql#SQL+xlat</a>). Any helpful hand which can bring some light to the darkness of my intellect?</div>
<div><br></div><div><br></div><div>Cheers,</div><div>seb.</div><div><br></div>
-<br>List info/subscribe/unsubscribe? See <a href="http://www.freeradius.org/list/users.html">http://www.freeradius.org/list/users.html</a></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Arran Cudbard-Bell</div><div><a href="mailto:a.cudbardb@freeradius.org">a.cudbardb@freeradius.org</a></div><div><br></div><div>RADIUS - Half the complexity of Diameter</div></div></span></span>
</div>
<br></div></body></html>