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
b6e4e56e
Commit
b6e4e56e
authored
May 27, 2017
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more performance issues, for
https://github.com/opnsense/core/issues/1662
parent
761ccab2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
interfaces.inc
src/etc/inc/interfaces.inc
+10
-10
No files found.
src/etc/inc/interfaces.inc
View file @
b6e4e56e
...
...
@@ -3747,11 +3747,15 @@ function convert_real_interface_to_friendly_interface_name($interface = 'wan')
return
null
;
}
foreach
(
legacy_config_get_interfaces
()
as
$if
=>
$ifname
)
{
// search direct
foreach
(
$config
[
'interfaces'
]
as
$if
=>
$ifname
)
{
if
(
$if
==
$interface
||
$ifname
[
'if'
]
==
$interface
)
{
return
$if
;
}
}
// search related
foreach
(
$config
[
'interfaces'
]
as
$if
=>
$ifname
)
{
if
(
get_real_interface
(
$if
)
==
$interface
)
{
return
$if
;
}
...
...
@@ -3947,16 +3951,12 @@ function get_real_interface($interface = "wan", $family = "all", $realv6iface =
$wanif
=
"enc0"
;
break
;
default
:
// If a real interface was alread passed simply
// pass the real interface back. This encourages
// the usage of this function in more cases so that
// we can combine logic for more flexibility.
if
(
empty
(
$config
[
'interfaces'
][
$interface
]))
{
// leftover from legacy code, it's not a very bright idea to use the same function call
// for both virtual as real interface names. does_interface_exist() is quite expensive.
if
(
does_interface_exist
(
$interface
,
$flush
))
{
$wanif
=
$interface
;
break
;
}
if
(
empty
(
$config
[
'interfaces'
][
$interface
]))
{
break
;
}
...
...
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