summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_rules_edit.php
diff options
context:
space:
mode:
Diffstat (limited to 'usr/local/www/firewall_rules_edit.php')
-rwxr-xr-xusr/local/www/firewall_rules_edit.php28
1 files changed, 26 insertions, 2 deletions
diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php
index c051518..542f832 100755
--- a/usr/local/www/firewall_rules_edit.php
+++ b/usr/local/www/firewall_rules_edit.php
@@ -95,6 +95,9 @@ if (isset($id) && $a_filter[$id]) {
if (isset($a_filter[$id]['direction']))
$pconfig['direction'] = $a_filter[$id]['direction'];
+ if (isset($a_filter[$id]['ipprotocol']))
+ $pconfig['ipprotocol'] = $a_filter[$id]['ipprotocol'];
+
if (isset($a_filter[$id]['protocol']))
$pconfig['proto'] = $a_filter[$id]['protocol'];
else
@@ -408,6 +411,9 @@ if ($_POST) {
if (isset($_POST['interface'] ))
$filterent['interface'] = $_POST['interface'];
+ if (isset($_POST['ipprotocol'] ))
+ $filterent['ipprotocol'] = $_POST['ipprotocol'];
+
if ($_POST['tcpflags_any']) {
$filterent['tcpflags_any'] = true;
} else {
@@ -539,6 +545,7 @@ if ($_POST) {
$filterent['icmptype'] = $a_filter[$id]['icmptype'];
else if (isset($filterent['icmptype']))
unset($filterent['icmptype']);
+
$filterent['source'] = $a_filter[$id]['source'];
$filterent['destination'] = $a_filter[$id]['destination'];
$filterent['associated-rule-id'] = $a_filter[$id]['associated-rule-id'];
@@ -728,6 +735,22 @@ include("head.inc");
<tr>
<?php endif; ?>
<tr>
+ <td width="22%" valign="top" class="vncellreq"><?=gettext("TCP/IP Version");?></td>
+ <td width="78%" class="vtable">
+ <select name="ipprotocol" class="formselect">
+ <?php $ipproto = array('inet' => 'IPv4','inet6' => 'IPv6');
+ foreach ($ipproto as $proto => $name): ?>
+ <option value="<?=$proto;?>"
+ <?php if ($proto == $pconfig['ipprotocol']): ?>
+ selected="selected"
+ <?php endif; ?>
+ ><?=$name;?></option>
+ <?php endforeach; ?>
+ </select>
+ <strong><?=gettext("Select the Internet Protocol version this rule applies to");?></strong><br />
+ </td>
+ </tr>
+ <tr>
<td width="22%" valign="top" class="vncellreq"><?=gettext("Protocol");?></td>
<td width="78%" class="vtable">
<select <?=$edit_disabled;?> name="proto" class="formselect" onchange="proto_change()">
@@ -819,7 +842,7 @@ include("head.inc");
<td>
<input <?=$edit_disabled;?> autocomplete='off' name="src" type="text" class="formfldalias" id="src" size="20" value="<?php if (!is_specialnet($pconfig['src'])) echo htmlspecialchars($pconfig['src']);?>"> /
<select <?=$edit_disabled;?> name="srcmask" class="formselect" id="srcmask">
-<?php for ($i = 31; $i > 0; $i--): ?>
+<?php for ($i = 127; $i > 0; $i--): ?>
<option value="<?=$i;?>" <?php if ($i == $pconfig['srcmask']) echo "selected"; ?>><?=$i;?></option>
<?php endfor; ?>
</select>
@@ -914,7 +937,8 @@ include("head.inc");
/
<select <?=$edit_disabled;?> name="dstmask" class="formselect" id="dstmask">
<?php
- for ($i = 31; $i > 0; $i--): ?>
+ for ($i = 127; $i > 0;
+$i--): ?>
<option value="<?=$i;?>" <?php if ($i == $pconfig['dstmask']) echo "selected"; ?>><?=$i;?></option>
<?php endfor; ?>
</select>
OpenPOWER on IntegriCloud