From 8902dd560bbbbfdb8b9df21d66062fde8bdaa7e7 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Tue, 29 Sep 2020 09:33:22 +0200 Subject: [PATCH] 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 --- src/www/interfaces.php | 2 +- src/www/interfaces_lagg_edit.php | 2 +- src/www/services_router_advertisements.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/www/interfaces.php b/src/www/interfaces.php index b2a9e2951..9a8eb9ccf 100644 --- a/src/www/interfaces.php +++ b/src/www/interfaces.php @@ -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); } diff --git a/src/www/interfaces_lagg_edit.php b/src/www/interfaces_lagg_edit.php index 17254770b..1a678a965 100644 --- a/src/www/interfaces_lagg_edit.php +++ b/src/www/interfaces_lagg_edit.php @@ -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); } diff --git a/src/www/services_router_advertisements.php b/src/www/services_router_advertisements.php index 4a1325192..55fca74e0 100644 --- a/src/www/services_router_advertisements.php +++ b/src/www/services_router_advertisements.php @@ -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); } }