interfaces: change max mtu value to 65535 in accordance with rfc791 (https://tools.ietf.org/html/rfc791). closes https://github.com/opnsense/core/issues/4359

This commit is contained in:
Ad Schellevis 2020-09-29 09:33:22 +02:00
parent 2269f1d302
commit 8902dd560b
3 changed files with 4 additions and 4 deletions

View File

@ -881,7 +881,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
}
if (!empty($pconfig['mtu'])) {
$mtu_low = 576;
$mtu_high = 9214;
$mtu_high = 65535;
if ($pconfig['mtu'] < $mtu_low || $pconfig['mtu'] > $mtu_high) {
$input_errors[] = sprintf(gettext('The MTU must be greater than %s bytes and less than %s.'), $mtu_low, $mtu_high);
}

View File

@ -118,7 +118,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
if (!empty($pconfig['mtu'])) {
$mtu_low = 576;
$mtu_high = 9214;
$mtu_high = 65535;
if ($pconfig['mtu'] < $mtu_low || $pconfig['mtu'] > $mtu_high) {
$input_errors[] = sprintf(gettext('The MTU must be greater than %s bytes and less than %s.'), $mtu_low, $mtu_high);
}

View File

@ -136,8 +136,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
if (!empty($pconfig['AdvRouteLifetime']) && !val_int_in_range($pconfig['AdvRouteLifetime'], 1, 4294967295)) {
$input_errors[] = sprintf(gettext('AdvRouteLifetime must be between %s and %s seconds.'), 1, 4294967295);
}
if (!empty($pconfig['AdvLinkMTU']) && !val_int_in_range($pconfig['AdvLinkMTU'], 1280, 8192)) {
$input_errors[] = sprintf(gettext('AdvLinkMTU must be between %s and %s bytes.'), 1280, 8192);
if (!empty($pconfig['AdvLinkMTU']) && !val_int_in_range($pconfig['AdvLinkMTU'], 1280, 65535)) {
$input_errors[] = sprintf(gettext('AdvLinkMTU must be between %s and %s bytes.'), 1280, 65535);
}
}