During boot local_sync_acocunts() should be able to access LDAP server
on a non-local network or also resolve LDAP server hostname. To make it
possible move calls to create static routes and start dnsmasq/unbound
to run earlier
without disabling gateway monitoring.
This allows the user to continue to monitor the gateway with dpinger, so
they can see how it is performing, but for the system not to take any
real action if the latency/loss exceeds the given limits.
A typical use case for this would be on a single-WAN system. There is no
failover option, so there is no point taking any real action when the
latency/loss is high. Having stuff try to failover (and stop/start
stuff...) is just disruptive.
In ths case the use could have disabled monitoring completely, but then
they get no feedback abut gateway performance.
1) Edit a NAT Port Forward rule, change the destination type to "Network", but do not input any network address/mask.
2) Press Save, an input error is reported telling that the network destination address/mask is required - good.
However, the destination type is no longer "Network" - it goes to "xxx address" where "xxx" is the selected interface.
The problem is that JS dst_change() is being called on every page load. That is good when starting a new entry (the Destination gets set to WAN address to match the default interface of WAN), or when starting to edit an existing entry (the code runs without messing anything up). But when data has been $_POSTed and there are input errors, we just want to redisplay whatever the user had selected, not go trying to fix up correlations between fields.
1) Edit a NAT 1:1 rule, change the source and/or destination type to "Network", but do not input any network address/mask.
2) Press Save, input errors are reported telling that the network source and/or destination address/mask is required - good.
However, the source and/or destination type is no longer "Network" - it defaults back to single or any.
To fix, firstly move "$pconfig = $_POST" to after where all the various special things have been done to $_POST - this makes $pconfig have the correctly-massaged stuff that the user $_POSTed.
Then add the special code to srctype_selected() and dsttype_selected() to handle the case when these have been specifically $_POSTed by the user (rather than inferring them from the src/dst vales and the logic in is_specialnet() ).
This is equivalent to the fix for firewall_rules_edit.php at commit 81e2aa253a
1) If there are multiple rows with invalid IP addresses then the same message was displayed multiple times. We might as well let the use know which row(s) have the problem.
2) The section that checks is_subnet stuff was first using is_ipaddr() (redundantly given it is already in the else of !is_ipaddr() ), and then is_subnet() - these would have handled both the IPv4 and IPv6 cases, so the other IPv6 tests would never have happened.
3) I don't think we need to test function_exists("is_ipaddrv6") any more - it had better be there in master!
Note: The front-end JS prevents entry of an invalid mask, so it is a bit hard for the user to actually generate the netmask error messages.
Add an option to choose whether the time spent idle by a user disconnected for exceeding the idle timeout must be included in the total session time sent to the RADIUS server or not.