Project

General

Profile

Download (1.58 KB) Statistics
| Branch: | Tag: | Revision:
1 cb7d18d5 Renato Botelho
#!/usr/local/bin/php-cgi -f
2 41196b69 Ermal LUÇI
<?php
3
/*
4 ac24dc24 Renato Botelho
 * rc.captiveportal_configure_mac
5
 *
6
 * part of pfSense (https://www.pfsense.org)
7 b8f91b7c Luiz Souza
 * Copyright (c) 2015-2018 Rubicon Communications, LLC (Netgate)
8 ac24dc24 Renato Botelho
 * All rights reserved.
9
 *
10 b12ea3fb Renato Botelho
 * Licensed under the Apache License, Version 2.0 (the "License");
11
 * you may not use this file except in compliance with the License.
12
 * You may obtain a copy of the License at
13 ac24dc24 Renato Botelho
 *
14 b12ea3fb Renato Botelho
 * http://www.apache.org/licenses/LICENSE-2.0
15 ac24dc24 Renato Botelho
 *
16 b12ea3fb Renato Botelho
 * Unless required by applicable law or agreed to in writing, software
17
 * distributed under the License is distributed on an "AS IS" BASIS,
18
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
 * See the License for the specific language governing permissions and
20
 * limitations under the License.
21 ac24dc24 Renato Botelho
 */
22 41196b69 Ermal LUÇI
23 c81ef6e2 Phil Davis
require_once("config.inc");
24
require_once("functions.inc");
25 41196b69 Ermal LUÇI
require_once("filter.inc");
26 c81ef6e2 Phil Davis
require_once("shaper.inc");
27
require_once("captiveportal.inc");
28 41196b69 Ermal LUÇI
29
global $cpzone;
30
31
$cpzone = isset($_GET['cpzone']) ? $_GET['cpzone'] : trim($argv[1]);
32
$startidx = isset($_GET['startidx']) ? $_GET['startidx'] : trim($argv[2]);
33
$stopidx = isset($_GET['cpzone']) ? $_GET['stopidx'] : trim($argv[3]);
34
35
$cpzoneidx = $config['captiveportal'][$cpzone]['zoneid'];
36
$filename = "{$g['tmp_path']}/{$cpzoneidx}_mac_{$startidx}_{$stopidx}";
37
38 6c07db48 Phil Davis
//log_error("STARTED: " . time() . " - {$cpzone} : $startidx : {$stopidx} : {$cpzoneidx} : {$filename}");
39 41196b69 Ermal LUÇI
captiveportal_passthrumac_configure($filename, $startidx, $stopidx);
40
//log_error("STOPPED: " .time() . " - {$cpzone} : $startidx : {$stopidx} : {$cpzoneidx} : {$filename}");
41
42 517b893e Renato Botelho
mwexec("/sbin/ipfw -q {$filename}");
43 41196b69 Ermal LUÇI
@unlink($filename);
44
?>