From: Lonnie A. <li...@lo...> - 2022-01-29 16:43:52
|
> On Jan 29, 2022, at 9:11 AM, Michael Keuter <li...@mk...> wrote: > > > >> Am 29.01.2022 um 15:08 schrieb Lonnie Abelbeck <li...@lo...>: >> >> Hi Michael, >> >>> I learned something today. Having the same interface configured on EXT and INT breaks stuff. I realise that the Network Tab pops an error if this is the case but it still writes it in gui.network.conf. So if you click away from the tab and forget about it then when you reboot the system it will be broken. >> >> Yes, I recall writing that code (more than 10 years ago). >> >> During saveNETWORKsettings(...) the checkNETWORKsettings() function could arguably be called at the beginning, resulting in any changes to be lost for these errors: >> -- >> } elseif ($result == 100) { >> putHtml('<p style="color: red;">Error in Network Configuration, an Interface is used more than once.</p>'); >> } elseif ($result == 101) { >> putHtml('<p style="color: red;">Error in Network Configuration, DMZ requires a LAN to also be defined.</p>'); >> } elseif ($result == 102) { >> putHtml('<p style="color: red;">Warning! Firewall is enabled, but not configured, click "Firewall Configuration" and save.</p>'); >> } elseif ($result == 103) { >> putHtml('<p style="color: red;">Error in Network Configuration, Invalid Timezone setting.</p>'); >> -- >> I recall testing this, and quickly decided to move checkNETWORKsettings() to the end of saveNETWORKsettings(...) so the changes (albeit with an error) are saved, with a descriptive error in "red" of what to fix (often a simple fix). >> >> During typical usage, a lot of tedious data is entered in the Network tab, and it is all too easy to mis-select an interface. Having to start over could raise a person's blood pressure. >> >> Not to be flippant, but if a person drives through a "Bridge Out" sign on the road ... it usually doesn't end well. :-) >> >> Lonnie >> > Just an idea: Is it possible to NOT show a "used" NIC in the dropdown menu of the other interfaces (even if not rebooted yet)? > > Let's we have 4 NICs, "External interface" is "eth0", then "1st LAN Interface" would show only "eth1,eth2,eth3". > > Michael Say you want to swap the "External interface" eth0 with the "1st LAN Interface" eth1, resulting in EXT:eth1 and LAN:eth0 ... all interfaces need to available to swap interfaces around. During the selecting process there could be interfaces used multiple times. Our PHP POST web interface offers a static state of menus between requests. I suppose there could be some javascript real-time warning ... and could be annoying. Lonnie |