From 646f993bffbe2414a23274902315f2c259f87aff Mon Sep 17 00:00:00 2001 From: Nachtfalkeaw Date: Wed, 14 Sep 2011 23:26:47 +0300 Subject: added "netmask/Framed-IP-Netmask" and "gateway/Framed-Route" --- config/freeradius.inc | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'config') diff --git a/config/freeradius.inc b/config/freeradius.inc index 4fbd5bc5..17b5408f 100644 --- a/config/freeradius.inc +++ b/config/freeradius.inc @@ -449,21 +449,29 @@ function freeradius_users_resync() { foreach ($users as $user) { $username = $user['username']; $password = $user['password']; - $multiconnect = $user['multiconnect']; + $multiconnect = $user['multiconnect']; $ip = $user['ip']; - $userexpiration=$user['expiration']; - $sessiontime=$user['sessiontime']; - $onlinetime=$user['onlinetime']; - $vlanid=$user['vlanid']; - $additionaloptions=$user['additionaloptions']; - $atrib=''; - $head="$username User-Password == ".'"'.$password.'"'; + $subnetmask = $user['subnetmask']; + $gateway = $user['gateway']; + $userexpiration=$user['expiration']; + $sessiontime=$user['sessiontime']; + $onlinetime=$user['onlinetime']; + $vlanid=$user['vlanid']; + $additionaloptions=$user['additionaloptions']; + $atrib=''; + $head="$username User-Password == ".'"'.$password.'"'; if ($multiconnect <> '') { $head .=", Simultaneous-Use += $multiconnect"; } if ($userexpiration <> '') { $head .=", Expiration := ".'"'.$userexpiration.'"'; } + if ($subnetmask<> '') { + $head .=", Framed-IP-Netmask = $subnetmask"; + } + if ($gateway<> '') { + $head .=", Framed-Route = $gateway"; + } if ($onlinetime <> '') { $head .=", Login-Time := ". '"' . $onlinetime .'"'; } -- cgit v1.2.3