Log actual interface rather than CARP interface

This commit is contained in:
Chris Buechler 2009-03-26 01:15:36 -04:00
parent 7bc4057d5c
commit 12df13d44d

View File

@ -277,7 +277,7 @@ function vpn_ipsec_configure($ipchg = false) {
/* if the remote gateway is in the local subnet, then don't add a route */
if(! ip_in_subnet($tunnel['remote-gateway'], "{$subnet_ip}/{$subnet_bits}")) {
if(is_ipaddr($gatewayip)) {
log_error("IPSEC interface is not WAN but {$tunnel['interface']}, adding static route for VPN endpoint {$tunnel['remote-gateway']} via {$gatewayip}");
log_error("IPSEC interface is not WAN but {$parentinterface}, adding static route for VPN endpoint {$tunnel['remote-gateway']} via {$gatewayip}");
mwexec("/sbin/route delete -host {$tunnel['remote-gateway']}");
mwexec("/sbin/route add -host {$tunnel['remote-gateway']} {$gatewayip}");
}