diff options
author | Ermal <eri@pfsense.org> | 2010-07-22 23:16:24 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-07-22 23:16:24 +0000 |
commit | d6a0379d291f5e98500776618559343f40254e40 (patch) | |
tree | 41d3c8f6a095bdef787994625b2d01c0b994c72b /etc | |
parent | d2ff48a06df5edbcd786994a77f28c7997974a0f (diff) | |
download | pfsense-d6a0379d291f5e98500776618559343f40254e40.zip pfsense-d6a0379d291f5e98500776618559343f40254e40.tar.gz |
Add a subnet option to allowed ip addresses on CP.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/captiveportal.inc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc index bc1596e..0d3853b 100644 --- a/etc/inc/captiveportal.inc +++ b/etc/inc/captiveportal.inc @@ -886,14 +886,17 @@ function captiveportal_allowedip_configure_entry($ipent) { $bw_up = $ruleno + 20000; $rules .= "pipe {$bw_up} config bw {$ipent['bw_up']}Kbit/s queue 100\n"; } + $subnet = ""; + if (!empty($ipent['sn'])) + $subnet = "/{$ipent['sn']}"; foreach ($tablein as $table) - $rules .= "table {$table} add {$ipent['ip']} {$bw_up}\n"; + $rules .= "table {$table} add {$ipent['ip']}{$subnet} {$bw_up}\n"; if ($enBwdown) { $bw_down = $ruleno + 20001; $rules .= "pipe {$bw_down} config bw {$ipent['bw_down']}Kbit/s queue 100\n"; } foreach ($tableout as $table) - $rules .= "table {$table} add {$ipent['ip']} {$bw_down}\n"; + $rules .= "table {$table} add {$ipent['ip']}{$subnet} {$bw_down}\n"; return $rules; } |