Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
2dd5db5f
Commit
2dd5db5f
authored
Aug 15, 2015
by
Fabian Franz
Committed by
Franco Fichtner
Aug 15, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
working changes for filtering ip version; closes #318
parent
598b9e56
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
diag_logs_filter.php
src/www/diag_logs_filter.php
+16
-1
No files found.
src/www/diag_logs_filter.php
View file @
2dd5db5f
...
...
@@ -555,12 +555,13 @@ if ($filtersubmit) {
$filterfieldsarray
[
'dstport'
]
=
getGETPOSTsettingvalue
(
'filterlogentries_destinationport'
,
null
);
$filterfieldsarray
[
'proto'
]
=
getGETPOSTsettingvalue
(
'filterlogentries_protocol'
,
null
);
$filterfieldsarray
[
'tcpflags'
]
=
getGETPOSTsettingvalue
(
'filterlogentries_protocolflags'
,
null
);
$filterfieldsarray
[
'version'
]
=
getGETPOSTsettingvalue
(
'filterlogentries_version'
,
null
);
$filterlogentries_qty
=
getGETPOSTsettingvalue
(
'filterlogentries_qty'
,
null
);
}
else
{
$interfacefilter
=
null
;
$filterlogentries_qty
=
null
;
$filtertext
=
null
;
foreach
(
array
(
'act'
,
'time'
,
'interface'
,
'srcip'
,
'srcport'
,
'dstip'
,
'dstport'
,
'proto'
,
'tcpflags'
)
as
$tag
)
{
foreach
(
array
(
'act'
,
'time'
,
'interface'
,
'srcip'
,
'srcport'
,
'dstip'
,
'dstport'
,
'proto'
,
'tcpflags'
,
'version'
)
as
$tag
)
{
$filterfieldsarray
[
$tag
]
=
null
;
}
}
...
...
@@ -653,6 +654,20 @@ include("head.inc");
<td><input
type=
"text"
class=
"form-control"
placeholder=
"
<?=
gettext
(
'Destination IP Address'
)
?>
"
id=
"filterlogentries_destinationipaddress"
name=
"filterlogentries_destinationipaddress"
value=
"
<?=
$filterfieldsarray
[
'dstip'
]
?>
"
></td>
<td><input
type=
"text"
class=
"form-control"
placeholder=
"
<?=
gettext
(
'Destination Port'
)
?>
"
id=
"filterlogentries_destinationport"
name=
"filterlogentries_destinationport"
value=
"
<?=
$filterfieldsarray
[
'dstport'
]
?>
"
></td>
<td><input
type=
"text"
class=
"form-control"
placeholder=
"
<?=
gettext
(
'Protocol Flags'
)
?>
"
id=
"filterlogentries_protocolflags"
name=
"filterlogentries_protocolflags"
value=
"
<?=
$filterfieldsarray
[
'tcpflags'
]
?>
"
></td>
<td>
<select
class=
"form-control"
id=
"filterlogentries_version"
name=
"filterlogentries_version"
>
<?php
$versionlist
=
array
(
"All"
=>
gettext
(
"Any"
),
"4"
=>
gettext
(
'IPv4'
),
"6"
=>
gettext
(
'IPv6'
));
foreach
(
$versionlist
as
$version
=>
$versionname
)
{
echo
'<option value="'
.
htmlspecialchars
(
$version
)
.
'"'
.
((
isset
(
$filterfieldsarray
[
'version'
])
&&
$filterfieldsarray
[
'version'
]
==
$version
)
?
' selected="selected"'
:
''
)
.
'>'
.
htmlspecialchars
(
$versionname
)
.
'</option>'
;
}
?>
</select>
</td>
</tr>
<tr>
<td></td><td></td><td></td><td></td><td></td>
<td><input
id=
"filtersubmit"
name=
"filtersubmit"
type=
"submit"
class=
"btn btn-primary"
style=
"vertical-align:top;"
value=
"
<?=
gettext
(
"Filter"
);
?>
"
/></td>
</tr>
</tbody>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment