Fix for redmine ticket #1993. Allow saving multiple dynamic entries.Make sure that return_gateways_status() also returns all gateways that have monitoring disabled as up.
Oops fix variable name
Blacklist lan as being used as default gateway when auto switching is on. This prevents some problems in general functionality with services.
Add an override for default interval to send icmp
Add a new option to allow disabling of gateway monitoring. This gateways will always be reported as up.
Use change here to be cleaner and less disruptive.
Switch back to the default gateway configured when possible when gateway switching is active
Add tunable, by default disabled, to enable the default gateway switching feature when the default one 'disappears'.
Correct default code disabling! Ponty-hat: myself
Disable the default route switching code since its causing more issues than solving. It needs more work to get re-enabled.
Remove blank trailing c/r.
Notify via smtp as well as growl
Correct error message for gateways to report down when the gateway is down and not high latency.
Another sweep at keeping the default route always present when the default setup route is marked as down. This now adds checks for configuration where a defaultgw is not specified by the user but deduced automatically.
Try to always keep pfSense with a default gateway to avoid errors for service running from pfSense itself. Previously PBR should be configured for such services. While PBR is a better fix this at least keeps users from complaining in simple setups. Reported by many.
nuke trailing carriage returns
Do not spam logs uselessly on bootup and sleep a bit before starting apinger.
Do not spam console with useless messages. Also remove killall not needed anymore.
Remove temporary hack which spams console during boot.
Do not guess the defaultgw this is static info.
Remove trailing carriage return
Kill apinger with a large axe until the TERM issues can be resolved
Fix the "all dynamic gateways are shown as default" problem reported here: http://forum.pfsense.org/index.php/topic,28960.0.html
A non-empty string will evaluate true with == operator.
Avoid generating a dynamic gateway entry in the list if there is already one in the config for the interface.
Test if this variable is set before making a reference, for safety. Add reference back for speed.
More unneeded references.
Report dynamic gateways as default even when they are down.
If gateways appear to lose their default status when they are down it canbe confusing for users. This is purely a UI change.
Add $g variable to global declaration so we can access it later.
Fix checking the status of gateways. Typos and unset variables! Spotted-by: Mark Huijgen
Be sane at what was supposed to be done.:
Do not show statically configured interfaces as with dynamic gateways because the gateway is already referenced/monitored on its own entry.
Make sure we do not overwrite the gateway stored in config with a dynamic gateway info. Correct POST var name(Found by ghnb). Also correctly reload only the defaultgw interface changed only if it is different than the present one.
cbuechler says monitorip should not be stored in <interfaces><$if>. See ticket #919
Do not support anymore an ip in the 'gateway' section of an interface.
Don't refer to non-existent variable.
Reported in forum http://forum.pfsense.org/index.php/topic,28643.0.html
Properly handle reinitializing of variables on the next loop. Reported-by: http://forum.pfsense.org/index.php/topic,28636.0.html
We might not have any defaultgw selected and consider wan as default. Make sure to catch this so GUI works and other parts that depend on defaultgw detection.
Make it possible to show default against dynamic gateway names in the GUI.
Actually display a the right class for static gateways. Also fix whitespace
Write status file every 5seconds.
Oops this is meant to add members not override them.
Cleanup code.
Ticket #867. Flush the cache when restarting apinger and also when rc.newwanip is called. also restart apinger earlier in to be on latest address asap.
Ticket #876. Actually use the friendly name for the key of the array returned by return_gateways_array() so the dynamic gateway and status pages work correctly.
Ticket #876. Show all gateways even though apinger is not monitoring them, for various reasons, this removes user confusion in the status pages.
Ticket #876. Add the ip to the respective files on ppp linkup event so the code of dynamic gateways finds them. Also reorganize/simplify/optimize the apinger config generation code. Do not use that 127.0.0.x hack anymore and avoid loops as much as possible.
Use the new events mechanisms to dispatch events.
Ticket #876. Remove old status file of apinger before restarting because it might confuse gui.
No functional change just code reshuffle.
Ticket #8. Use proper IP to pfctl -b and run the command after the rules have been removed for the not 'down' interfaces.
Make sure that the RRD path exists before apinger is started. Should really fix quality graphs on NanoBSD.
Create a valid apinger configuration file for targets that are down during creation.
Do not write anything to config before finishing all tests of correctnes. This avoids a problem of wrong config to apinger Discovered-by: Seth
Do not try to reload apinger config but always kill the running process and start a new one so it behaves.
Actually apinger can be reloaded and this is not doing its job apparently.
Actually send the HUP signal to tell apinger that a new config file is to be loaded! This should solve a lot of issues with apinger monitoring.
Make an extra check for monitor to be explicitly an ip otherwise apinger breaks.
Properly find gateway ip. The code before did not match for dynamic gateways.
Make some non functional changes, mostly to keep up with latest gw changes. Related to Ticket #666
Remove stray ). Fixes #661.
Give apinger the new srcip dircetive so it does not struggle anymore with the routing table.
Do not delete/create a route for a gateway that is marked as down to avoid removing needed routes to check teh gateways. Reported-by: http://forum.pfsense.org/index.php/topic,25854.0.html
Remove newline
Remove second %
Be consistent on % for loss state.
Catch up with php limits.
Show some sensible defaults for delay and loss.
Reorganize code to be able to actually use the lookup_gateway_ip_by_name() function to find even dynamic gateways ip.
Return the gateway status only for gateways apinger knows about instead of assuming that all gateways are down, which might give consecuences. Also prepend 'filter_' to the function used to kill states for down gateways in filter.inc to be consistent.
Ups remove erroneous curly.
Actually return to previous function code for lookup_gateway_ip_by_name() to not create recursive loops. There is still the question of how dynamic interfaces should be handled here?
Revert "Use a global array for the most part of using the return_gateways_array() function in the backend which should lower the memory allocated/cached by php a lot."
This reverts commit e51cf5960f6718a14c07daa7b6e96337fdba1f0e.
Use a global array for the most part of using the return_gateways_array() function in the backend which should lower the memory allocated/cached by php a lot.
Remove unecessary check.
Do not duplicate gateway entries when status file is not present. Mostly an innocuos programmer error.
Fixes #536. More fixes and optimizations on the various functions and status pages used for gateways [groups].
Fixes #536. More fixes and optimizations on the various functions used for gateways [groups].
Fixes #536. Actually add all available gateways to the gateway_groups array so all up members will be present for balancing.
Add myself to copyright for gwlb file.
Preserve previous behaviour of having all alarms on for all gateways. Not sure this should be/is the right behaviour though.
Move the settings of down/latency/loss to per gateway. This allows more fine grained control on gateways.
Correct delay matching on outgoing load balancer code.
Catch up with latest apinger changes to make easier to extract the status of gateways.
Remove check that prevented bugs from happening. Now all code paths are safe from this.
Ticket #506. Correctly save dynamic gateways extra parameters.
Actually minimum weight is 1.
Allow for each gateway a weight to be choosen if the gateway has to be used in Gateway groups. This will create that many entries in the route-to statement as the weight says.
Ticket #507. Do not remove all static routes to readd them back. The change will never delete a rule but define the action to be taken on it, either add or change a present route. Be consinstent on gateways allowed to be selected as destinations for static routes, including dynamic gateways.
temporary work around for ticket #536
Use stristr as a microoptimization.
Be more strict on validations.
Fixed variable definition.
Ticket #304. Fix bogus dynamic entries in system->gateways after deleting gateways.
Revert "Fix linking interface to vlans function so it works correctly."
This reverts commit 930595154ccc8702befdd880f1c424b78040af2a.
Fix linking interface to vlans function so it works correctly.
Ticket #303. Fix very many bugs in this code. From strings that were not quoted propperly to completely broken code paths.
Ticket #305. Grey out the gateway when it is a dynamic one.
Make sure to properly use the configured monitor IP address for dynamic interfaces too.
Style fixes for the interfaces page, use switch instead of a large if,elseif procedure.Fix the monitor IP route adding and removing to skip non IP addresses and dynamic entriesAdd a Gateway item on the gateway_item stack so that it properly shows up in th configuration. Static configurations will need to...
Make sure to use the correct dummy IP address for the monitor for dynamic interfaces