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
09f9ace8
Commit
09f9ace8
authored
Nov 30, 2015
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
interfaces: zap wrapper around get_real_interface()
parent
ddc987e2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
16 deletions
+14
-16
interfaces.inc
src/etc/inc/interfaces.inc
+2
-6
miniupnpd.inc
src/etc/inc/miniupnpd.inc
+8
-7
diag_arp.php
src/www/diag_arp.php
+3
-2
diag_packet_capture.php
src/www/diag_packet_capture.php
+1
-1
No files found.
src/etc/inc/interfaces.inc
View file @
09f9ace8
...
...
@@ -3985,16 +3985,12 @@ function is_interface_group($if)
return
false
;
}
function
interface_group_add_member
(
$interface
,
$groupname
)
{
function
interface_group_add_member
(
$interface
,
$groupname
)
{
$interface
=
get_real_interface
(
$interface
);
mwexec
(
"/sbin/ifconfig
{
$interface
}
group "
.
escapeshellarg
(
$groupname
),
true
);
}
/* COMPAT Function */
function
convert_friendly_interface_to_real_interface_name
(
$interface
)
{
return
get_real_interface
(
$interface
);
}
/* convert fxp0 -> wan, etc. */
function
convert_real_interface_to_friendly_interface_name
(
$interface
=
'wan'
)
{
...
...
src/etc/inc/miniupnpd.inc
View file @
09f9ace8
...
...
@@ -36,13 +36,13 @@ function sync_package_miniupnpd() {
$upnp_config
=
$config
[
'installedpackages'
][
'miniupnpd'
][
'config'
][
0
];
$config_file
=
'/var/etc/miniupnpd.conf'
;
if
(
!
isset
(
$upnp_config
[
'ext_iface'
])
||
empty
(
$upnp_config
[
'ext_iface'
]))
if
(
!
isset
(
$upnp_config
[
'ext_iface'
])
||
empty
(
$upnp_config
[
'ext_iface'
]))
{
$ext_ifname
=
get_real_interface
();
else
{
$if
=
convert_friendly_interface_to_real_interface_nam
e
(
$upnp_config
[
'ext_iface'
]);
if
(
$if
!=
$upnp_config
[
'ext_iface'
])
}
else
{
$if
=
get_real_interfac
e
(
$upnp_config
[
'ext_iface'
]);
if
(
$if
!=
$upnp_config
[
'ext_iface'
])
{
$ext_ifname
=
$if
;
else
{
}
else
{
$ext_ifname
=
get_real_interface
();
upnp_warn
(
"Could not resolve real interface for
{
$upnp_config
[
'ext_iface'
]
}
, defaulting to WAN"
);
}
...
...
@@ -59,9 +59,10 @@ function sync_package_miniupnpd() {
foreach
(
$iface_array
as
$iface
)
{
/* Setting the same internal and external interface is not allowed. */
if
(
$iface
==
$upnp_config
[
'ext_iface'
])
if
(
$iface
==
$upnp_config
[
'ext_iface'
])
{
continue
;
$if
=
convert_friendly_interface_to_real_interface_name
(
$iface
);
}
$if
=
get_real_interface
(
$iface
);
/* above function returns iface if fail */
if
(
$if
!=
$iface
)
{
$addr
=
find_interface_ip
(
$if
);
...
...
src/www/diag_arp.php
View file @
09f9ace8
...
...
@@ -210,9 +210,10 @@ $i = 0;
$ifdescrs
=
get_configured_interface_with_descr
();
foreach
(
$ifdescrs
as
$key
=>
$interface
)
{
$thisif
=
convert_friendly_interface_to_real_interface_nam
e
(
$key
);
if
(
!
empty
(
$thisif
))
$thisif
=
get_real_interfac
e
(
$key
);
if
(
!
empty
(
$thisif
))
{
$hwif
[
$thisif
]
=
$interface
;
}
}
$data
=
array
();
...
...
src/www/diag_packet_capture.php
View file @
09f9ace8
...
...
@@ -421,7 +421,7 @@ if ($do_tcpdump) {
$searchcount
=
""
;
}
$selectedif
=
convert_friendly_interface_to_real_interface_nam
e
(
$selectedif
);
$selectedif
=
get_real_interfac
e
(
$selectedif
);
if
(
$action
==
gettext
(
"Start"
))
{
$matchstr
=
implode
(
$matches
,
" and "
);
...
...
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