Revision 2e4cad90
Added by David Wood almost 10 years ago
src/etc/inc/interfaces.inc | ||
---|---|---|
3117 | 3117 |
// use the MTU configured on the interface ... |
3118 | 3118 |
if (is_array($config['interfaces'])) { |
3119 | 3119 |
foreach ($config['interfaces'] as $interface) { |
3120 |
if ($interface['if'] != $ppp['if']) |
|
3120 |
if ($interface['if'] != $ppp['if']) {
|
|
3121 | 3121 |
continue; |
3122 |
if (!empty($interface['mtu'])) |
|
3122 |
} |
|
3123 |
if (!empty($interface['mtu'])) { |
|
3123 | 3124 |
$mtu_wanted = intval($interface['mtu']) + 8; |
3125 |
} |
|
3124 | 3126 |
} |
3125 | 3127 |
} |
3126 | 3128 |
// ... unless there is an MTU configured on the port in question |
3127 | 3129 |
if (!empty($ppp['mtu'])) { |
3128 | 3130 |
$mtus = explode(',',$ppp['mtu']); |
3129 |
if (!empty($mtus[$pid])) |
|
3131 |
if (!empty($mtus[$pid])) {
|
|
3130 | 3132 |
$mtu_wanted = intval($mtus[$pid]) + 8; |
3133 |
} |
|
3131 | 3134 |
} |
3132 |
if ($mtu_wanted > $mtu) |
|
3135 |
if ($mtu_wanted > $mtu) {
|
|
3133 | 3136 |
$mtu = $mtu_wanted; |
3137 |
} |
|
3134 | 3138 |
} |
3135 | 3139 |
} |
3136 | 3140 |
} |
Also available in: Unified diff
Coding style fixes in interface_mtu_wanted_for_pppoe()