Chetan Gaonker | 7f4bf74 | 2016-05-04 15:56:08 -0700 | [diff] [blame^] | 1 | # Assign compatibility data to request for sqlippool |
| 2 | dhcp_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 | |