<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
Updated The sql querys to honour priority field, and happily it seems
that rlm_sql processes groups in the order they come out of the
database... which is good.<br>
What the packets below are show, is that if the group with the highest
priority has all it's check items match, then it's reply items are
added fine.<br>
<br>
However if the first group doesn't match then the other groups arn't
processed ! So although the user is still authorised via LDAP none of
the group reply items are sent :(<br>
<br>
If the priority of the groups is reversed, so the 'nas_admins' group
comes out of the database first, then the nas_admins reply items work,
but the roaming_users group doesn't *sigh*.<br>
<br>
Would also appear that CIDR ip notation doesn't work for NAS-IP-Address
... But thats not too bad, as you can stick the relevant NAS's in a
huntgroup and check against that instead.<br>
<br>
* Confirmed this is broken in branch_1_1<br>
* Confirmed this is fixed in CVS head with group priority being
honoured properly.<br>
<br>
Don't suppose there's any chance of bringing some of the changes in the
CVS Head rlm_sql over to branch_1_1 for the next 1.1.* release is there
?<br>
.... Namely the new sql_clients function with the user definable query,
and the new groups handling. As the groups handling is a pretty major
bug, and i'm sure<br>
anyone else using sql will be having issues with the later releases.<br>
<br>
Oh and a huge great big thanks, to whoever fixed rlm_sql in the cvs
head ... I think it was Alexander Serkin. :)<br>
<br>
<b>Rad Group Check<br>
<br>
SQL query:</b> SELECT radgroupcheck . id , radgroupcheck .
GroupName , radgroupcheck . Attribute , radgroupcheck . Value ,
radgroupcheck . op FROM radgroupcheck , usergroup WHERE usergroup .
UserName = 'ac221' AND usergroup . GroupName = radgroupcheck .
GroupName ORDER BY usergroup . priority DESC , radgroupcheck .
GroupName LIMIT 0, 30 ; <br>
<b>Rows:</b> 2
<table id="table_results" class="data">
  <thead><tr>
    <th>id
    </th>
    <th class="condition">GroupName
    </th>
    <th>Attribute
    </th>
    <th>Value
    </th>
    <th>op
    </th>
  </tr>
  </thead> <tbody>
    <tr class="odd">
      <td class="nowrap" align="right">5</td>
      <td class="condition">roaming_users</td>
      <td class="">Service-Type</td>
      <td class="">Framed-User</td>
      <td class="">==</td>
    </tr>
    <tr class="even">
      <td class="nowrap" align="right">1</td>
      <td class="condition">nas_admins</td>
      <td class="">Service-Type</td>
      <td class="">NAS-Prompt-User</td>
      <td class="">==</td>
    </tr>
  </tbody>
</table>
<br>
<b>Rad Group Reply</b><br>
<br>
<b>SQL query:</b> SELECT radgroupreply . id , radgroupreply .
GroupName , radgroupreply . Attribute , radgroupreply . Value ,
radgroupreply . op FROM radgroupreply , usergroup WHERE usergroup .
UserName = 'ac221' AND usergroup . GroupName = radgroupreply .
GroupName ORDER BY usergroup . priority DESC , radgroupreply .
GroupName LIMIT 0, 30 ; <br>
<b>Rows:</b> 7
<table id="table_results" class="data">
  <thead><tr>
    <th>id
    </th>
    <th class="condition">GroupName
    </th>
    <th>Attribute
    </th>
    <th>Value
    </th>
    <th>op
    </th>
  </tr>
  </thead> <tbody>
    <tr class="odd">
      <td class="nowrap" align="right">3</td>
      <td class="condition">roaming_users</td>
      <td class="">Tunnel-Type</td>
      <td class="">13</td>
      <td class="">=</td>
    </tr>
    <tr class="even">
      <td class="nowrap" align="right">4</td>
      <td class="condition">roaming_users</td>
      <td class="">Tunnel-Medium-Type</td>
      <td class="">6</td>
      <td class="">=</td>
    </tr>
    <tr class="odd">
      <td class="nowrap" align="right">5</td>
      <td class="condition">roaming_users</td>
      <td class="">Tunnel-Private-Group-ID</td>
      <td class="">134</td>
      <td class="">=</td>
    </tr>
    <tr class="even">
      <td class="nowrap" align="right">8</td>
      <td class="condition">roaming_users</td>
      <td class="">Service-Type</td>
      <td class="">4</td>
      <td class="">=</td>
    </tr>
    <tr class="odd">
      <td class="nowrap" align="right">10</td>
      <td class="condition">roaming_users</td>
      <td class="">Fall-Through</td>
      <td class="">yes</td>
      <td class="">=</td>
    </tr>
    <tr class="even">
      <td class="nowrap" align="right">1</td>
      <td class="condition">nas_admins</td>
      <td class="">Service-Type</td>
      <td class="">6</td>
      <td class="">=</td>
    </tr>
    <tr class="odd">
      <td class="nowrap" align="right">9</td>
      <td class="condition">nas_admins</td>
      <td class="">Fall-Through</td>
      <td class="">yes</td>
      <td class="">=</td>
    </tr>
  </tbody>
</table>
<span class="syntax"><span class="syntax_digit syntax_digit_integer"></span><br>
<br>
Sending Access-Request of id 178 to 139.184.**.*** port 1812<br>
        User-Name = "ac221"<br>
        User-Password = "nopassword"<br>
        Service-Type = NAS-Prompt-User<br>
        NAS-IP-Address = 139.184.8.1<br>
rad_recv: Access-Accept packet from host 139.184.**.***:1812, id=178,
length=20<br>
<br>
Sending Access-Request of id 225 to 139.184.**.*** port 1812<br>
        User-Name = "ac221"<br>
        User-Password = "nopassword"<br>
        Service-Type = Framed-User<br>
        NAS-IP-Address = 139.184.8.1<br>
rad_recv: Access-Accept packet from host 139.184.**.***:1812, id=225,
length=43<br>
        Tunnel-Type:0 = VLAN<br>
        Tunnel-Medium-Type:0 = IEEE-802<br>
        Tunnel-Private-Group-Id:0 = "134"<br>
        Service-Type = Callback-Framed-User<br>
<br>
<br>
Thanks,<br>
Arran<br>
</span>
</body>
</html>