[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freeradius-users
Subject:    DHCP. Several dhcp attributes from the sql table
From:       Sergey Kodentsev <sergk () ic ! vrn ! ru>
Date:       2020-11-30 5:46:56
Message-ID: f62ed41b-6430-e6c1-60be-6b8995ddf16a () ic ! vrn ! ru
[Download RAW message or body]

Hi,

On freeradius version 2.1.12 I could do the following

dhcp DHCP-Request {
............
dhcpstatic
..........

}

where dhcpstatic is the sql module

sql dhcpstaticnd {
database = "mysql"
driver = "rlm_sql _ $ {database}"
...............................

         authorize_check_query = ..........
authorize_reply_query = "SELECT id, 'dhcp' as UserName, attribute, 
value, op
          FROM $ {authreply_table} dh
          WHERE RemoteID = BINARY '% {DHCP-Relay-Remote-Id}'
and upper (CircuitID) = upper ('% {DHCP-Relay-Circuit-Id}')
and MacAddr = BINARY '% {DHCP-Client-Hardware-Address}'
          ORDER BY LeaseDate desc "
...........................................
}

Several dhcp attributes were fetched from the authreply_table, not just 
DHCP-Your-IP-Address

This configuration does not work on freeradius version 3.0.21

How can I select several dhcp attributes from the sql table and send 
them to DHCP-ACK?

-- 
Sergey Kodentsev

-- 
С уважением,
Сергей Коденцев,
Воронеж,
Информсвязь-Черноземье

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic