summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@world.inf.org>2013-05-07 11:38:33 +0545
committerPhil Davis <phil.davis@world.inf.org>2013-05-07 11:38:33 +0545
commitbe2a18bf57a8d4d5224e5a6043f06b10e4d018a7 (patch)
treeddaa71e6493bd0f5b242262f49e94781430f6226
parent8edaa92ccbfd30a66e5bb4bcacd6ba5da7001146 (diff)
downloadpfsense-be2a18bf57a8d4d5224e5a6043f06b10e4d018a7.zip
pfsense-be2a18bf57a8d4d5224e5a6043f06b10e4d018a7.tar.gz
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. Return the friendly interface name ("wan", "opt1" etc) rather than the actual device name ("vr0", "vr1" etc). The openvpn and dynamic dns code that uses this needs to work with various entries in the config that all use the friendly interface name.
-rw-r--r--etc/inc/gwlb.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc
index 088f251..5864733 100644
--- a/etc/inc/gwlb.inc
+++ b/etc/inc/gwlb.inc
@@ -92,7 +92,7 @@ rrd interval 60s;
## These parameters can be overridden in a specific alarm configuration
alarm default {
command on "/usr/local/sbin/pfSctl -c 'service reload dyndns %T' -c 'service reload ipsecdns' -c 'service reload openvpn %T' -c 'filter reload' "
- command off "/usr/local/sbin/pfSctl -c 'service reload dyndnsall' -c 'service reload ipsecdns' -c 'service reload openvpn' -c 'filter reload' "
+ command off "/usr/local/sbin/pfSctl -c 'service reload dyndns %T' -c 'service reload ipsecdns' -c 'service reload openvpn %T' -c 'filter reload' "
combine 10s
}
@@ -836,7 +836,7 @@ function lookup_gateway_interface_by_name($name) {
$gateways_arr = return_gateways_array(false, true);
if (!empty($gateways_arr[$name])) {
- $interfacegw = $gateways_arr[$name]['interface'];
+ $interfacegw = $gateways_arr[$name]['friendlyiface'];
return ($interfacegw);
}
OpenPOWER on IntegriCloud