Révision cbe38717
Ajouté par Ermal il y a presque 10 ans
etc/inc/captiveportal.inc | ||
---|---|---|
708 | 708 |
$cpentry[2], // clientip |
709 | 709 |
$cpentry[3], // clientmac |
710 | 710 |
10); // NAS Request |
711 |
$_gb = @pfSense_ipfw_Tableaction($cpzone, IP_FW_TABLE_ZERO_ENTRY_STATS, 1, $cpentry[2], $cpentry[3]);
|
|
712 |
$_gb = @pfSense_ipfw_Tableaction($cpzone, IP_FW_TABLE_ZERO_ENTRY_STATS, 2, $cpentry[2], $cpentry[3]);
|
|
711 |
$_gb = @pfSense_ipfw_Tableaction($cpzoneid, IP_FW_TABLE_XZEROENTRY, 1, $cpentry[2], $cpentry[3]);
|
|
712 |
$_gb = @pfSense_ipfw_Tableaction($cpzoneid, IP_FW_TABLE_XZEROENTRY, 2, $cpentry[2], $cpentry[3]);
|
|
713 | 713 |
RADIUS_ACCOUNTING_START($cpentry[1], // ruleno |
714 | 714 |
$cpentry[4], // username |
715 | 715 |
$cpentry[5], // sessionid |
... | ... | |
835 | 835 |
|
836 | 836 |
/* remove a single client according to the DB entry */ |
837 | 837 |
function captiveportal_disconnect($dbent, $radiusservers,$term_cause = 1,$stop_time = null) { |
838 |
global $g, $config, $cpzone; |
|
838 |
global $g, $config, $cpzone, $cpzoneid;
|
|
839 | 839 |
|
840 | 840 |
$stop_time = (empty($stop_time)) ? time() : $stop_time; |
841 | 841 |
|
... | ... | |
855 | 855 |
|
856 | 856 |
if (is_ipaddr($dbent[2])) { |
857 | 857 |
/* Delete client's ip entry from tables 1 and 2. */ |
858 |
$_gb = @pfSense_ipfw_Tableaction($cpzone, IP_FW_TABLE_DEL, 1, $dbent[2], $dbent[3]);
|
|
859 |
$_gb = @pfSense_ipfw_Tableaction($cpzone, IP_FW_TABLE_DEL, 2, $dbent[2], $dbent[3]);
|
|
858 |
$_gb = @pfSense_ipfw_Tableaction($cpzoneid, IP_FW_TABLE_XDEL, 1, $dbent[2], $dbent[3]);
|
|
859 |
$_gb = @pfSense_ipfw_Tableaction($cpzoneid, IP_FW_TABLE_XDEL, 2, $dbent[2], $dbent[3]);
|
|
860 | 860 |
/* XXX: Redundant?! Ensure all pf(4) states are killed. */ |
861 | 861 |
$_gb = @pfSense_kill_states($dbent[2]); |
862 | 862 |
$_gb = @pfSense_kill_srcstates($dbent[2]); |
... | ... | |
1951 | 1951 |
|
1952 | 1952 |
$clientsn = (is_ipaddrv6($clientip)) ? 128 : 32; |
1953 | 1953 |
if (!isset($config['captiveportal'][$cpzone]['nomacfilter'])) |
1954 |
$_gb = @pfSense_ipfw_Tableaction($cpzone, IP_FW_TABLE_ADD, 1, $clientip, $clientsn, $clientmac, $bw_up_pipeno);
|
|
1954 |
$_gb = @pfSense_ipfw_Tableaction($cpzoneid, IP_FW_TABLE_XADD, 1, $clientip, $clientsn, $clientmac, $bw_up_pipeno);
|
|
1955 | 1955 |
else |
1956 |
$_gb = @pfSense_ipfw_Tableaction($cpzone, IP_FW_TABLE_ADD, 1, $clientip, $clientsn, NULL, $bw_up_pipeno);
|
|
1956 |
$_gb = @pfSense_ipfw_Tableaction($cpzoneid, IP_FW_TABLE_XADD, 1, $clientip, $clientsn, NULL, $bw_up_pipeno);
|
|
1957 | 1957 |
|
1958 | 1958 |
if (!isset($config['captiveportal'][$cpzone]['nomacfilter'])) |
1959 |
$_gb = @pfSense_ipfw_Tableaction($cpzone, IP_FW_TABLE_ADD, 2, $clientip, $clientsn, $clientmac, $bw_down_pipeno);
|
|
1959 |
$_gb = @pfSense_ipfw_Tableaction($cpzoneid, IP_FW_TABLE_XADD, 2, $clientip, $clientsn, $clientmac, $bw_down_pipeno);
|
|
1960 | 1960 |
else |
1961 |
$_gb = @pfSense_ipfw_Tableaction($cpzone, IP_FW_TABLE_ADD, 2, $clientip, $clientsn, NULL, $bw_down_pipeno);
|
|
1961 |
$_gb = @pfSense_ipfw_Tableaction($cpzoneid, IP_FW_TABLE_XADD, 2, $clientip, $clientsn, NULL, $bw_down_pipeno);
|
|
1962 | 1962 |
|
1963 | 1963 |
if ($attributes['voucher']) |
1964 | 1964 |
$attributes['session_timeout'] = $remaining_time; |
Formats disponibles : Unified diff
Bring the code of captiveportal up to speed with its module counterpart requirments