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
cf732b0e
Commit
cf732b0e
authored
Feb 05, 2016
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(legacy) zap get_interface_mtu
parent
0be62650
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
21 deletions
+8
-21
interfaces.inc
src/etc/inc/interfaces.inc
+6
-19
services.inc
src/etc/inc/services.inc
+2
-2
No files found.
src/etc/inc/interfaces.inc
View file @
cf732b0e
...
...
@@ -723,8 +723,8 @@ function interface_bridge_add_member($bridgeif, $interface)
return
;
}
$mtu
=
get_interface_mtu
(
$bridgeif
)
;
$mtum
=
get_interface_mtu
(
$interface
)
;
$mtu
=
legacy_interface_stats
(
$bridgeif
)[
'mtu'
]
;
$mtum
=
legacy_interface_stats
(
$interface
)[
'mtu'
]
;
if
(
$mtu
!=
$mtum
&&
!
(
substr
(
$interface
,
0
,
3
)
==
"gif"
&&
$mtu
<=
1500
))
{
legacy_interface_mtu
(
$interface
,
$mtu
);
...
...
@@ -2908,11 +2908,11 @@ function interface_vlan_adapt_mtu($vlanifs, $mtu)
legacy_interface_mtu
(
$vlan
[
'vlanif'
],
$mtu
);
}
}
else
{
if
(
get_interface_mtu
(
$vlan
[
'vlanif'
])
!=
$mtu
)
{
if
(
legacy_interface_stats
(
$vlan
[
'vlanif'
])[
'mtu'
]
!=
$mtu
)
{
legacy_interface_mtu
(
$vlan
[
'vlanif'
],
$mtu
);
}
}
}
elseif
(
get_interface_mtu
(
$vlan
[
'vlanif'
])
!=
$mtu
)
{
}
elseif
(
legacy_interface_stats
(
$vlan
[
'vlanif'
])[
'mtu'
]
!=
$mtu
)
{
legacy_interface_mtu
(
$vlan
[
'vlanif'
],
$mtu
);
}
}
...
...
@@ -3095,7 +3095,7 @@ function interface_configure($interface = 'wan', $reloadall = false, $linkupeven
}
if
(
$wancfg
[
'mtu'
]
>
$parentmtu
)
{
if
(
get_interface_mtu
(
$realhwif
)
!=
$wancfg
[
'mtu'
])
{
if
(
legacy_interface_stats
(
$realhwif
)[
'mtu'
]
!=
$wancfg
[
'mtu'
])
{
legacy_interface_mtu
(
$realhwif
,
$wancfg
[
'mtu'
]);
}
...
...
@@ -3105,7 +3105,7 @@ function interface_configure($interface = 'wan', $reloadall = false, $linkupeven
legacy_interface_mtu
(
$realif
,
$wancfg
[
'mtu'
]);
}
}
else
{
if
(
$wancfg
[
'mtu'
]
!=
get_interface_mtu
(
$realif
)
)
{
if
(
$wancfg
[
'mtu'
]
!=
legacy_interface_stats
(
$realif
)[
'mtu'
]
)
{
legacy_interface_mtu
(
$realif
,
$wancfg
[
'mtu'
]);
}
...
...
@@ -4977,19 +4977,6 @@ function is_interface_wireless($interface)
}
/****f* interfaces/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
=
pfSense_get_interface_addresses
(
$interface
);
return
$mtu
[
'mtu'
];
}
function
get_interface_mac
(
$interface
)
{
$macinfo
=
pfSense_get_interface_addresses
(
$interface
);
...
...
src/etc/inc/services.inc
View file @
cf732b0e
...
...
@@ -160,7 +160,7 @@ function services_radvd_configure($blacklist = array())
$radvdconf
.=
"
\t
AdvSendAdvert on;
\n
"
;
$radvdconf
.=
"
\t
MinRtrAdvInterval 5;
\n
"
;
$radvdconf
.=
"
\t
MaxRtrAdvInterval 20;
\n
"
;
$mtu
=
get_interface_mtu
(
$realif
)
;
$mtu
=
legacy_interface_stats
(
$realif
)[
'mtu'
]
;
if
(
is_numeric
(
$mtu
))
$radvdconf
.=
"
\t
AdvLinkMTU
{
$mtu
}
;
\n
"
;
else
...
...
@@ -292,7 +292,7 @@ function services_radvd_configure($blacklist = array())
$radvdconf
.=
"
\t
AdvSendAdvert on;
\n
"
;
$radvdconf
.=
"
\t
MinRtrAdvInterval 3;
\n
"
;
$radvdconf
.=
"
\t
MaxRtrAdvInterval 10;
\n
"
;
$mtu
=
get_interface_mtu
(
$realif
)
;
$mtu
=
legacy_interface_stats
(
$realif
)[
'mtu'
]
;
if
(
is_numeric
(
$mtu
))
$radvdconf
.=
"
\t
AdvLinkMTU
{
$mtu
}
;
\n
"
;
else
...
...
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