From 11017fa4ab31d33bcbf6678fd7395762e712d22c Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Mon, 11 May 2020 05:10:55 +0200 Subject: [PATCH] system: fix static gatway wizard handing; closes #3873 Mismatched our automatic gateway naming, assumed IPv6 on IPv4 and did not disable monitor by default as we recommend. --- .../mvc/app/library/OPNsense/Routing/Gateways.php | 4 ++++ src/wizard/system.xml | 9 +++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/opnsense/mvc/app/library/OPNsense/Routing/Gateways.php b/src/opnsense/mvc/app/library/OPNsense/Routing/Gateways.php index 48f30483e..dd2567238 100644 --- a/src/opnsense/mvc/app/library/OPNsense/Routing/Gateways.php +++ b/src/opnsense/mvc/app/library/OPNsense/Routing/Gateways.php @@ -168,6 +168,10 @@ class Gateways // default priority $gw_arr['priority'] = 255; } + if (empty($gw_arr['ipprotocol'])) { + // default address family + $gw_arr['ipprotocol'] = 'inet'; + } $gw_arr["if"] = $definedIntf[$gw_arr["interface"]]['if']; $gw_arr["attribute"] = $i++; if (Util::isIpAddress($gateway->gateway)) { diff --git a/src/wizard/system.xml b/src/wizard/system.xml index 26cf9669e..9929cb6b2 100644 --- a/src/wizard/system.xml +++ b/src/wizard/system.xml @@ -425,7 +425,7 @@ if (!empty($input_errors)) {