Commit 1be6437c authored by Franco Fichtner's avatar Franco Fichtner

gwlb: better log message for monitor routes

parent f729d881
...@@ -175,7 +175,7 @@ EOD; ...@@ -175,7 +175,7 @@ EOD;
/* flush the monitor unconditionally */ /* flush the monitor unconditionally */
if (is_ipaddrv4($gateway['gateway']) && $gateway['monitor'] != $gateway['gateway']) { if (is_ipaddrv4($gateway['gateway']) && $gateway['monitor'] != $gateway['gateway']) {
log_error("Removing static route for monitor {$gateway['monitor']}"); log_error("Removing static route for monitor {$gateway['monitor']} via {$gateway['gateway']}");
mwexec("/sbin/route delete -host " . escapeshellarg($gateway['monitor']), true); mwexec("/sbin/route delete -host " . escapeshellarg($gateway['monitor']), true);
} }
...@@ -191,7 +191,7 @@ EOD; ...@@ -191,7 +191,7 @@ EOD;
* not strictly necessary but is a added level of protection. * not strictly necessary but is a added level of protection.
*/ */
if (is_ipaddrv4($gateway['gateway']) && $gateway['monitor'] != $gateway['gateway']) { if (is_ipaddrv4($gateway['gateway']) && $gateway['monitor'] != $gateway['gateway']) {
log_error("Adding static route for monitor through {$gateway['gateway']}"); log_error("Adding static route for monitor {$gateway['monitor']} via {$gateway['gateway']}");
mwexec("/sbin/route add -host " . escapeshellarg($gateway['monitor']) . mwexec("/sbin/route add -host " . escapeshellarg($gateway['monitor']) .
" " . escapeshellarg($gateway['gateway']), true); " " . escapeshellarg($gateway['gateway']), true);
} }
...@@ -226,7 +226,7 @@ EOD; ...@@ -226,7 +226,7 @@ EOD;
/* flush the monitor unconditionally */ /* flush the monitor unconditionally */
if (is_ipaddrv6($gateway['gateway']) && $gateway['monitor'] != $gateway['gateway']) { if (is_ipaddrv6($gateway['gateway']) && $gateway['monitor'] != $gateway['gateway']) {
log_error("Removing static route for monitor {$gateway['monitor']}"); log_error("Removing static route for monitor {$gateway['monitor']} via {$gateway['gateway']}");
mwexec("/sbin/route delete -host -inet6 " . escapeshellarg($gateway['monitor']), true); mwexec("/sbin/route delete -host -inet6 " . escapeshellarg($gateway['monitor']), true);
} }
...@@ -242,7 +242,7 @@ EOD; ...@@ -242,7 +242,7 @@ EOD;
* not strictly necessary but is a added level of protection. * not strictly necessary but is a added level of protection.
*/ */
if (is_ipaddrv6($gateway['gateway']) && $gateway['monitor'] != $gateway['gateway']) { if (is_ipaddrv6($gateway['gateway']) && $gateway['monitor'] != $gateway['gateway']) {
log_error("Adding static route for monitor through {$gateway['gateway']}"); log_error("Adding static route for monitor {$gateway['monitor']} via {$gateway['gateway']}");
mwexec("/sbin/route add -host -inet6 " . escapeshellarg($gateway['monitor']) . mwexec("/sbin/route add -host -inet6 " . escapeshellarg($gateway['monitor']) .
" " . escapeshellarg($gateway['gateway']), true); " " . escapeshellarg($gateway['gateway']), true);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment