blob: 4396f062570e6087a3fc7e7642218b900e63f68a [file] [log] [blame]
Chetan Gaonker7f4bf742016-05-04 15:56:08 -07001# Assign compatibility data to request for sqlippool
2dhcp_sqlippool.post-auth {
3
4
5 # Do some minor hacks to the request so that it looks
6 # like a RADIUS request to the SQL IP Pool module.
7 update request {
8 User-Name = "DHCP-%{DHCP-Client-Hardware-Address}"
9 Calling-Station-Id = "%{DHCP-Client-Hardware-Address}"
10 NAS-IP-Address = "%{%{DHCP-Gateway-IP-Address}:-127.0.0.1}"
11 Acct-Status-Type = Start
12 }
13
14 # Call the actual module
15 dhcp_sqlippool
16
17 # Convert Framed-IP-Address to DHCP, but only if we
18 # actually allocated an address.
19 if (ok) {
20 update reply {
21 DHCP-Your-IP-Address = "%{reply:Framed-IP-Address}"
22 }
23 }
24}
25