Skip to content

Commit

Permalink
gateways: fixup gateway as well if link local
Browse files Browse the repository at this point in the history
  • Loading branch information
fichtner committed Sep 25, 2017
1 parent dec5ea3 commit c6c9d10
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/etc/inc/gwlb.inc
Original file line number Diff line number Diff line change
Expand Up @@ -210,15 +210,16 @@ EOD;
}

/*
* '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 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'], '%')) {
if (is_linklocal($gateway['monitor']) && strpos($gateway['monitor'], '%') === false) {
$gateway['monitor'] .= "%{$gateway['interface']}";
}
if (is_linklocal($gwifip) && !strstr($gwifip, '%')) {
if (is_linklocal($gateway['gateway']) && strpos($gateway['gateway'], '%') === false) {
$gateway['gateway'] .= "%{$gateway['interface']}";
}
if (is_linklocal($gwifip) && strpos($gwifip, '%') === false) {
$gwifip .= "%{$gateway['interface']}";
}

Expand Down

0 comments on commit c6c9d10

Please sign in to comment.