mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
parent
ec0249eccb
commit
cbff71a1e1
@ -1334,6 +1334,13 @@ function generate_user_filter_rule($rule, $ngcounter) {
|
||||
$src = "{$pppoesa}/{$pppoesn}";
|
||||
break;
|
||||
}
|
||||
/* check for opt$NUMip here */
|
||||
$matches = "";
|
||||
if (preg_match("/opt([0-9999])ip/", $rule['source']['network'], $matches)) {
|
||||
$optnum = $matches[0];
|
||||
$real_int = convert_friendly_interface_to_real_interface_name("opt{$optnum}");
|
||||
$dst = find_interface_ip($real_int);
|
||||
}
|
||||
if (isset($rule['source']['not'])) $src = "!{$src}";
|
||||
}
|
||||
} else if ($rule['source']['address']) {
|
||||
@ -1426,6 +1433,13 @@ function generate_user_filter_rule($rule, $ngcounter) {
|
||||
$dst = "{$ppoesa}/{$pppoesn}";
|
||||
break;
|
||||
}
|
||||
/* check for opt$NUMip here */
|
||||
$matches = "";
|
||||
if (preg_match("/opt([0-9999])ip/", $rule['destination']['network'], $matches)) {
|
||||
$optnum = $matches[0];
|
||||
$real_int = convert_friendly_interface_to_real_interface_name("opt{$optnum}");
|
||||
$dst = find_interface_ip($real_int);
|
||||
}
|
||||
if (isset($rule['destination']['not'])) $dst = " !{$dst}";
|
||||
}
|
||||
} else if ($rule['destination']['address']) {
|
||||
|
||||
@ -567,6 +567,9 @@ include("head.inc");
|
||||
<option value="pppoe" <?php if ($pconfig['dst'] == "pppoe") { echo "selected"; } ?>>PPPoE clients</option>
|
||||
<?php for ($i = 1; isset($config['interfaces']['opt' . $i]); $i++): ?>
|
||||
<option value="opt<?=$i;?>" <?php if ($pconfig['dst'] == "opt" . $i) { echo "selected"; } ?>><?=htmlspecialchars($config['interfaces']['opt' . $i]['descr']);?> subnet</option>
|
||||
<option value="opt<?=$i;?>ip"<?php if ($pconfig['src'] == "opt" . $i . "ip") { echo "selected"; } ?>>
|
||||
<?=$config['interfaces']['opt' . $i]['descr']?> address
|
||||
</option>
|
||||
<?php endfor; ?>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user