diff --git a/src/opnsense/mvc/app/controllers/OPNsense/OpenVPN/forms/dialogCSO.xml b/src/opnsense/mvc/app/controllers/OPNsense/OpenVPN/forms/dialogCSO.xml index c1384c773..c99764095 100644 --- a/src/opnsense/mvc/app/controllers/OPNsense/OpenVPN/forms/dialogCSO.xml +++ b/src/opnsense/mvc/app/controllers/OPNsense/OpenVPN/forms/dialogCSO.xml @@ -135,27 +135,4 @@ true Set primary WINS server address (NetBIOS over TCP/IP Name Server). Repeat this option to set secondary WINS server addresses. - - header - - true - - - cso.tun_mtu - - text - Take the TUN device MTU to be tun-mtu and derive the link MTU from it. - - - cso.fragment - - text - Enable internal datagram fragmentation so that no UDP datagrams are sent which are larger than the specified byte size. - - - cso.mssfix - - checkbox - Announce to TCP sessions running over the tunnel that they should limit their send packet sizes such that after OpenVPN has encapsulated them, the resulting UDP packet size that OpenVPN sends to its peer will not exceed the recommended size. - diff --git a/src/opnsense/mvc/app/controllers/OPNsense/OpenVPN/forms/dialogInstance.xml b/src/opnsense/mvc/app/controllers/OPNsense/OpenVPN/forms/dialogInstance.xml index 0215d4c93..ca797e4de 100644 --- a/src/opnsense/mvc/app/controllers/OPNsense/OpenVPN/forms/dialogInstance.xml +++ b/src/opnsense/mvc/app/controllers/OPNsense/OpenVPN/forms/dialogInstance.xml @@ -362,4 +362,25 @@ Set to 0 to disable, remember to change your client as well. Set primary NTP server address (Network Time Protocol). Repeat this option to set secondary NTP server addresses. + + instane.tun_mtu + + text + true + Take the TUN device MTU to be tun-mtu and derive the link MTU from it. + + + instane.fragment + + text + true + Enable internal datagram fragmentation so that no UDP datagrams are sent which are larger than the specified byte size. + + + instance.mssfix + + checkbox + true + Announce to TCP sessions running over the tunnel that they should limit their send packet sizes such that after OpenVPN has encapsulated them, the resulting UDP packet size that OpenVPN sends to its peer will not exceed the recommended size. + diff --git a/src/opnsense/mvc/app/models/OPNsense/OpenVPN/OpenVPN.php b/src/opnsense/mvc/app/models/OPNsense/OpenVPN/OpenVPN.php index b211fa517..e7ac69840 100644 --- a/src/opnsense/mvc/app/models/OPNsense/OpenVPN/OpenVPN.php +++ b/src/opnsense/mvc/app/models/OPNsense/OpenVPN/OpenVPN.php @@ -143,9 +143,6 @@ class OpenVPN extends BaseModel 'description', 'dns_domain', 'dns_domain_search', - 'fragment', - 'mssfix', - 'tun_mtu', 'tunnel_network', 'tunnel_networkv6', ]; diff --git a/src/opnsense/mvc/app/models/OPNsense/OpenVPN/OpenVPN.xml b/src/opnsense/mvc/app/models/OPNsense/OpenVPN/OpenVPN.xml index 55daa7986..e0706f07f 100644 --- a/src/opnsense/mvc/app/models/OPNsense/OpenVPN/OpenVPN.xml +++ b/src/opnsense/mvc/app/models/OPNsense/OpenVPN/OpenVPN.xml @@ -91,19 +91,6 @@ N - - N - 60 - 65535 - - - N - 0 - 65528 - - - N - @@ -381,6 +368,19 @@ , Y + + N + 60 + 65535 + + + N + 0 + 65528 + + + N + carp N diff --git a/src/opnsense/scripts/openvpn/ovpn_service_control.php b/src/opnsense/scripts/openvpn/ovpn_service_control.php index 612fafe27..42c7f9c7b 100755 --- a/src/opnsense/scripts/openvpn/ovpn_service_control.php +++ b/src/opnsense/scripts/openvpn/ovpn_service_control.php @@ -112,7 +112,6 @@ function get_vhid_status() return $vhids; } - $opts = getopt('ah', [], $optind); $args = array_slice($argv, $optind); @@ -130,8 +129,10 @@ if (isset($opts['h']) || empty($args) || !in_array($args[0], ['start', 'stop', ' if ($action != 'stop') { $mdl->generateInstanceConfig($instance_id); } + $vhids = $action == 'configure' ? get_vhid_status() : []; $instance_ids = []; + foreach ($mdl->Instances->Instance->iterateItems() as $key => $node) { if (empty((string)$node->enabled)) { continue; @@ -177,6 +178,7 @@ if (isset($opts['h']) || empty($args) || !in_array($args[0], ['start', 'stop', ' } fclose($statHandle); } + /** * When -a is specified, cleaup up old or disabled instances */ @@ -208,5 +210,6 @@ if (isset($opts['h']) || empty($args) || !in_array($args[0], ['start', 'stop', ' } } } + closelog(); }