mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
MFC 6893
Add get_interface_mtu()
This commit is contained in:
parent
01ae6c4092
commit
ffb4b005d1
@ -132,7 +132,7 @@ function enable_hardware_offloading($interface) {
|
||||
* man polling on a freebsd box for the following list
|
||||
*/
|
||||
$supported_ints = array('dc', 'em', 'fwe', 'fwip', 'fxp', 'ixgb', 'ste',
|
||||
'nge', 're', 'rl', 'sf', 'sis', 'ste', 'vge', 'vr', 'xl');
|
||||
'nge', 're', 'rl', 'sf', 'sis', 'ste', 'vge', 'vr', 'xl', 'fxp');
|
||||
foreach($supported_ints as $int) {
|
||||
if(stristr($interface,$int) != false) {
|
||||
mwexec("/sbin/ifconfig {$interface} polling");
|
||||
@ -249,6 +249,16 @@ function is_carp_defined() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/****f* pfsense-utils/get_interface_mtu
|
||||
* NAME
|
||||
* get_interface_mtu - Return the mtu of an interface
|
||||
* RESULT
|
||||
* $tmp - Returns the mtu of an interface
|
||||
******/
|
||||
function get_interface_mtu($interface) {
|
||||
$mtu = `/sbin/ifconfig {$interface} | /usr/bin/grep mtu | /usr/bin/cut -d" " -f4`;
|
||||
}
|
||||
|
||||
/****f* pfsense-utils/find_number_of_created_carp_interfaces
|
||||
* NAME
|
||||
* find_number_of_created_carp_interfaces - Return the number of CARP interfaces.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user