From e5e2e46300e263e9364a93807742004e95c3bc56 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Fri, 22 Oct 2021 10:03:13 +0200 Subject: [PATCH] dhcp: clarify code around is_linklocal() conditional --- src/etc/inc/plugins.inc.d/dhcpd.inc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/etc/inc/plugins.inc.d/dhcpd.inc b/src/etc/inc/plugins.inc.d/dhcpd.inc index 28c17f963..8ce0b1b08 100644 --- a/src/etc/inc/plugins.inc.d/dhcpd.inc +++ b/src/etc/inc/plugins.inc.d/dhcpd.inc @@ -308,11 +308,17 @@ function dhcpd_radvd_configure($verbose = false, $blacklist = array()) $radvdconf .= "\tAdvDefaultLifetime 0;\n"; } + /* + * Only a CARP VIP can inject a link-local address and it + * means we need to force that address into the RA message + * for failover to work. + */ if (is_linklocal($ifcfgipv6)) { - $radvdconf .= "\tAdvSourceLLAddress off;\n"; $radvdconf .= "\tAdvRASrcAddress {\n"; $radvdconf .= "\t\t{$ifcfgipv6};\n"; $radvdconf .= "\t};\n"; + /* to avoid wrong MAC being stuck in failover case only */ + $radvdconf .= "\tAdvSourceLLAddress off;\n"; } $stanzas = array();