Bring back static routes to fix issues reported on Ticext #3179
Fix #3172, return_gateway_groups_array() was returning the last vip since it was using wrong variable name on iteration
Ooops fix this to add only th einterface
Add scope identifier to target when its link-local
Cleanup some code that is not needed anymore
Force apinger to write the status file before getting gateway status
Reload apinger now that we can rather than restarting. Related to Ticket #3119
Fix #3113, fix multiple english spell errors s/seperet/separat/
Fix #3091, fix bad var assignment
Resolves #2910. Make apinger write its status file just after starting so that thing work as expected
Remove referenced binary not used anymore
Remove unused code and spurious alert
Use file_put_contents for simplicity and readbility
Replace all linklocal checks by is_linklocal()
Fixup gwlb functions related to gw failover
Make apinger pass the gateway parameter both when an alarm alarms (gateway is down) and when it comes good (gateway is up). This way the downstream openvpn and dyndns code can know what happened and do sensible stuff....
ipprotocol is inet or inet6
Take dynamic6 into consideration too
Deduplicate and simplify code
Make more strict comparison to avoid type issues when gw name only contain numbers. Fixes #2956
Fix whitespace and indent
Add default case when detecting dynamic gateway ip
Add a default to $wancfg['ipaddr'] case for both ipv4 and ipv6 to allow gateway ip to be returned rather then 'dynamic' for an openvpn connection
Make fe80: addresses check case insensitive
Use apinger macros to send the gateway name for openvpn and dyndns. Ipsec will reload all of it since its single process
Provide a function to get all gateway groups a gateway is member of
Optimize a bit interface_gateway_group_member
Check if the argument is a gateway or an interface
Correct code and initialize properly variables escpecially arrays. Also do fixes and simplificate to make it more readble
Correct check from previous code path simplification
Initialize some arrays to avoid php issues and also use list() here to avoid double array dereference
Simplify a bit code branching no change on functionality
Track apinger status in /var/run instead of /tmp
This is a one line status file updated every few seconds. It would bebetter to store this in /var/run since that is (always?) a ram disk onpfSense. Especially important on systems with flash storage.
see: http://forum.pfsense.org/index.php/topic,52734.msg281834.html#msg281834
If gatway is dynamic the type cannot be determined, trim the code trying to do something impossible. While here optimize a bit
Try to remove as much as possible _stf special case through the code
Just set defaultgw after all gateways are processed, it fixes return_gateways_array()
This message can be really spammy on a failure if you have multiple gateway groups. Disable e-mail notification of this message for now.If the e-mail actually made it out, at least one of the gateways must still be up...
If the user has IPv6 disabled, don't create dynamic IPv6 gateways.
Only allow gateways of the appropriate type (ipv4 or ipv6) to affect whether a gateway is marked as default, otherwise you can end up with an ipv4 gateway marked as default for ipv6 and the gui just shows "default".
Oops correct interface name
Make gateways for assigned OpenVPN servers as well as clients.
Add unset
Switch to is_array() check and add curly
gateway monitoring, make the notifications generated clear to tell which gateway/group they are about
Separate default gateway switching code to its own function, fix it to only operate on one address family at a time. Old method wouldn't re-set inet gateway if there was an inet6 default.
Make the gateway group member check a boolean, might convert to something else at a later time so we could check group memberships.Also launch the dyndns configure if the dyndns interface is a gateway group name, could check membership later if we wanted.
Add function that checks if the interface is part of a gateway group.
Reference the correct variable here, it was broken before and could never have worked.
Remove the filter configure call as this could otherwise lead to a recursive filter configure.
Put apinger default values into a function
The default advanced apinger parameter values are now returned by function return_apinger_defaults. So they can easily be obtained by any code that cares.
Make sure that we process the logic statement correctly, otherwise we might accidentally end up missing dual stacked or tunneled interface gateways
Change field name from lowloss to losslowrelated in http://redmine.pfsense.org/issues/2537
Reconfigure OpenVPN on gateway change
Comment out adding static routes for gateway monitor IPs because we now bind to the correct Interface with apinger.
Fix: Warning: preg_match(): No ending delimiter '/' found in /etc/inc/gwlb.inc on line 696
Check in code that allows for using a gateway group as the interface on the OpenVPN server page. Only allow IPv4 gateway groups for now. We'll need to add IPv6 suppport here later when we import OpenVPN 2.3.Unbreak the gateway group function on broken configurations like a missing 3G stick....
Needs a default case so IPv6 interfaces are resolved to a real interface
Changeover to the new multiple command pfSctl
Reverse the arguments, i got them wrong.Redmine ticket #1965
Trigger dyndns and ipsecdns updates through check_reload_status. IpsecDNS already performs a filter_configure() too.Redmine ticket #1965
Make sure to return the Null route gateways too for looking up a gateway entry
Some minor enhancements from renaming the Gathering Data to Pending.When it doesn't exist in the array it's really unknown. Make that lightblue. show a ~
Fix Typo, although the host might indeed be loca. We'll just keep it local instead.
Allow for Null routes
Unbreak php errors on login form
The gateway groups array now knows about vips to be tied into that gateway group so we can tie the groups into services.Redmine ticket #1965
Actually save the IPprotocol variable into the config, otherwise it stil won't work.People will likely need to edit and save their gateways now if they have double entries.e.g. both manual and automatically added entries, these will dissapear as soon as you save....
Finally give in and sprout a Internet Protocol drop down on the gateways edit screen.With added validation and multiple detection parts to work when the value is not set yet.Redmine ticket #2463
Add the address family tag to the gateway groups array
Allow saving on system.php if the gateways are down.
Prevent duplicate gateways from showing up if the interface is down. Redmine ticket #2442
Add the PPP automatic interface type. This would show the _PPP gateways.
Make sure VPN interface gateways are handled separately
Add the correct fix to pick up the IPv6 gateway for slaac interfaces
Make sure that SLAAC gateways show up in return_gateways_array();redmine ticket #1834
Some IPv6 fixes for gateway groups
Make sure that we use the right interface for 6rd
Add better hardening to the dynamic gateway code, handle IPv6 networks betterPrevent duplicate monitor IP addresses in the apinger configuration, otherwise we might end up with -4 million milisecond responses.Show the actual type of dynamic connection appended to the gateway name
Remove suprious debugging line
Add the stf0 interface to interface_has_gateway_v6() for 6to4
Adding gateway support for 6rd support, does not add route yet.Adds to ticket #2117
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.
Add a find_interface_ipv6_ll() to find the link local address of a interface.Use this link local address for the apinger srcip otherwise we might try using the DHCP6 /128 address which will fail.We need to extend apinger or any replacement thereoff to understand the %{$realif} scope suffix for link local addresses so that these are always correct. This is important since link local gateway addresses are a normal thing and FreeBSD will complain otherwise.
Another address family check for dynamic gateways, v4 has dynamic, v6 has dynamic6 as string.
Add a possible "dynamic6 type to differentiate between IPv6 and IPv4 dynamic connections"
Add a interface_has_gatewayv6() function to determine if a interface has a IPv6 gateway.Implement that function return_gateways_array() to prevent ghost entries
Add the IP protocol to the configured gateway list to prevent duplicate entries on dynamic interfaces
Remove stray echo statement
Remove stray print_r()
Automatically pick up on dynamic IPv6 interfaces. For Example dhcp6.
Add a function that allows you to validate the address family on 2 addresses or 1 address and a gateway name. the gateway name must be the 2nd argument.
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
Merge remote-tracking branch 'upstream/master'
Conflicts: etc/inc/easyrule.inc etc/inc/filter.inc etc/inc/interfaces.inc etc/inc/services.inc etc/inc/xmlrpc_client.inc usr/local/www/fbegin.inc usr/local/www/services_dhcp.php
Merge remote-tracking branch 'mainline/master' into inc
Conflicts: etc/inc/voucher.inc usr/local/www/fbegin.inc
Add tunable, by default disabled, to enable the default gateway switching feature when the default one 'disappears'.
Test the right variable otherwise we have no hope of getting a v6 gateway