Commit 2db592b1 authored by Franco Fichtner's avatar Franco Fichtner

firewall: always display all known gateways on edit

There are a few cases where the gateway code is eligible
to drop a gateway on grounds of being disabled, inactive,
unconfigured or where the actual interface assigned is
disabled.  This is undesire because users that configure
a gateway won't be able to use it.

There are no bad side effects from the former by selecting
a whatsoever dysfunctional gateway, because the problem still
has to be fixed by the user in the gateway setup itself.

Worst of all, removing a disabled but used gateway makes
it not show up on edit, effectively wiping its setting on
save.  This breaks POLA.

While there, also enable the null routes for IPv4 and IPv6.

PR: https://forum.opnsense.org/index.php?topic=2100
parent 7fb658c1
......@@ -1238,7 +1238,7 @@ include("head.inc");
<select name='gateway' class="selectpicker" data-live-search="true" data-size="5" data-width="auto">
<option value="" ><?=gettext("default");?></option>
<?php
foreach(return_gateways_array() as $gwname => $gw):
foreach(return_gateways_array(true, true, true) as $gwname => $gw):
?>
<option value="<?=$gwname;?>" <?=$gwname == $pconfig['gateway'] ? " selected=\"selected\"" : "";?>>
<?=$gw['name'];?>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment