From 6dba59f27913613f0735bf6fa6cf848f34fc2255 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Thu, 13 Jan 2022 12:15:37 +0100 Subject: [PATCH] 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. --- src/etc/inc/plugins.inc.d/dpinger.inc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/etc/inc/plugins.inc.d/dpinger.inc b/src/etc/inc/plugins.inc.d/dpinger.inc index 12b293149..5d0016f0f 100644 --- a/src/etc/inc/plugins.inc.d/dpinger.inc +++ b/src/etc/inc/plugins.inc.d/dpinger.inc @@ -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 */