Skip to content
Permalink
Browse files

gateways: may need this as well

  • Loading branch information...
fichtner committed Sep 24, 2017
1 parent 678a209 commit a31a0a482083d0831f1b7c40f2e451bbf909f854
Showing with 13 additions and 9 deletions.
  1. +13 −9 src/etc/inc/gwlb.inc
@@ -209,6 +209,19 @@ EOD;
continue;
}
/*
* 'monitor' has been set, so makes sure it has precedence over
* 'gateway' in defining the source IP. Otherwise if 'gateway'
* is a local link and 'monitor' is global routable then the
* ICMP6 response would not find its way back home...
*/
if (is_linklocal($gateway['monitor']) && !strstr($gateway['monitor'], '%')) {
$gateway['monitor'] .= "%{$gateway['interface']}";
}
if (is_linklocal($gwifip) && !strstr($gwifip, '%')) {
$gwifip .= "%{$gateway['interface']}";
}
/* flush the monitor unconditionally */
if (is_ipaddrv6($gateway['gateway']) && $gateway['monitor'] != $gateway['gateway']) {
log_error("Removing static route for monitor {$gateway['monitor']} via {$gateway['gateway']}");
@@ -231,15 +244,6 @@ EOD;
system_host_route($gateway['monitor'], $gateway['gateway'], false, true);
}
/*
* 'monitor' has been set, so makes sure it has precedence over
* 'gateway' in defining the source IP. Otherwise if 'gateway'
* is a local link and 'monitor' is global routable then the
* ICMP6 response would not find its way back home...
*/
if (is_linklocal($gateway['monitor']) && !strstr($gateway['monitor'], '%')) {
$gateway['monitor'] .= "%{$gateway['interface']}";
}
} else {
continue;
}

0 comments on commit a31a0a4

Please sign in to comment.
You can’t perform that action at this time.