system: use correct IPv6 interface

Suspicion confirmed that e.g. 6RD misses the wrong interface.
Just run the code when necessary instead of caching it for
a situation that isn't matching.
This commit is contained in:
Franco Fichtner 2022-01-13 12:15:37 +01:00
parent 61e0b950cc
commit 6dba59f279

View File

@ -192,12 +192,10 @@ function dpinger_configure_do($verbose = false, $gwname = null)
* then the ICMP6 response would not find its way back home.
*/
if (is_linklocal($gateway['monitor']) && strpos($gateway['monitor'], '%') === false) {
/* XXX 'if' can be wrong for IPv6 */
$gateway['monitor'] .= "%{$gateway['if']}";
$gateway['monitor'] .= '%' . get_real_interface($gateway['interface'], 'inet6');
}
if (is_linklocal($gateway['gateway']) && strpos($gateway['gateway'], '%') === false) {
/* XXX 'if' can be wrong for IPv6 */
$gateway['gateway'] .= "%{$gateway['if']}";
$gateway['gateway'] .= '%' . get_real_interface($gateway['interface'], 'inet6');
}
/* flush the monitor unconditionally */