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
e97c4f1d
Commit
e97c4f1d
authored
Jan 09, 2017
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
interfaces: fix a crash report
parent
6c6b8f1d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
17 deletions
+9
-17
interfaces.inc
src/etc/inc/interfaces.inc
+3
-13
interfaces.lib.inc
src/etc/inc/interfaces.lib.inc
+6
-4
No files found.
src/etc/inc/interfaces.inc
View file @
e97c4f1d
...
...
@@ -4520,22 +4520,12 @@ function get_interface_mac($interface)
return
$macinfo
[
"macaddr"
];
}
/****f* interfaces/is_jumbo_capable
* NAME
* is_jumbo_capable - Test if interface is jumbo frame capable. Useful for determining VLAN capability.
* INPUTS
* $int - string containing interface name
* RESULT
* boolean - true or false
******/
function
is_jumbo_capable
(
$iface
)
{
$intf_details
=
legacy_interface_details
(
trim
(
$iface
));
if
(
in_array
(
'vlan_mtu'
,
$intf_details
[
'capabilities'
]))
{
return
true
;
}
else
{
return
false
;
}
return
isset
(
$intf_details
[
'capabilities'
])
&&
in_array
(
'vlan_mtu'
,
$intf_details
[
'capabilities'
]);
}
function
get_vip_descr
(
$ipaddress
)
...
...
src/etc/inc/interfaces.lib.inc
View file @
e97c4f1d
...
...
@@ -199,19 +199,21 @@ function legacy_interface_stats($ifs=null)
* @param $intf filter on interface name (empty for all)
* @return array list of interface specifics indexed by physical interface name
*/
function
legacy_interfaces_details
(
$intf
=
null
)
function
legacy_interfaces_details
(
$intf
=
null
)
{
$result
=
array
();
if
(
!
empty
(
$intf
))
{
$tmp_intf
=
escapeshellarg
(
$intf
);
}
else
{
$tmp_intf
=
""
;
$tmp_intf
=
''
;
}
$cmd
=
'/sbin/ifconfig -m '
.
$tmp_intf
;
exec
(
$cmd
.
' 2>&1'
,
$ifconfig_data
,
$ret
);
if
(
$ret
)
{
log_error
(
'The command `'
.
$cmd
.
'\' failed to execute '
.
implode
(
' '
,
$ifconfig_data
)
);
return
array
()
;
log_error
(
'The command `'
.
$cmd
.
'\' failed to execute '
.
implode
(
' '
,
$ifconfig_data
));
return
$result
;
}
$current_interface
=
null
;
...
...
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