Revision 60884727
Added by Cyrill B over 12 years ago
etc/inc/captiveportal.inc | ||
---|---|---|
1850 | 1850 |
pfSense_pipe_action("pipe {$bw_up_pipeno} config bw {$bw_up}Kbit/s queue 100 buckets 16"); |
1851 | 1851 |
pfSense_pipe_action("pipe {$bw_down_pipeno} config bw {$bw_down}Kbit/s queue 100 buckets 16"); |
1852 | 1852 |
|
1853 |
$clientsn = (is_ipaddrv6($clientip)) ? 128 : 32; |
|
1853 | 1854 |
captiveportal_ipfw_set_context($cpzone); |
1854 | 1855 |
if (!isset($config['captiveportal'][$cpzone]['nomacfilter'])) |
1855 |
pfSense_ipfw_Tableaction($cpzone, IP_FW_TABLE_ADD, 1, $clientip, 32, $clientmac, $bw_up_pipeno);
|
|
1856 |
pfSense_ipfw_Tableaction($cpzone, IP_FW_TABLE_ADD, 1, $clientip, $clientsn, $clientmac, $bw_up_pipeno);
|
|
1856 | 1857 |
else |
1857 |
pfSense_ipfw_Tableaction($cpzone, IP_FW_TABLE_ADD, 1, $clientip, 32, NULL, $bw_up_pipeno);
|
|
1858 |
pfSense_ipfw_Tableaction($cpzone, IP_FW_TABLE_ADD, 1, $clientip, $clientsn, NULL, $bw_up_pipeno);
|
|
1858 | 1859 |
|
1859 | 1860 |
if (!isset($config['captiveportal'][$cpzone]['nomacfilter'])) |
1860 |
pfSense_ipfw_Tableaction("", IP_FW_TABLE_ADD, 2, $clientip, 32, $clientmac, $bw_down_pipeno);
|
|
1861 |
pfSense_ipfw_Tableaction("", IP_FW_TABLE_ADD, 2, $clientip, $clientsn, $clientmac, $bw_down_pipeno);
|
|
1861 | 1862 |
else |
1862 |
pfSense_ipfw_Tableaction("", IP_FW_TABLE_ADD, 2, $clientip, 32, NULL, $bw_down_pipeno);
|
|
1863 |
pfSense_ipfw_Tableaction("", IP_FW_TABLE_ADD, 2, $clientip, $clientsn, NULL, $bw_down_pipeno);
|
|
1863 | 1864 |
|
1864 | 1865 |
if ($attributes['voucher']) |
1865 | 1866 |
$attributes['session_timeout'] = $remaining_time; |
Also available in: Unified diff
Determine subnet from address family