diff --git a/ddclient.in b/ddclient.in index ce445fb..bc6fdb9 100755 --- a/ddclient.in +++ b/ddclient.in @@ -1636,6 +1636,7 @@ sub read_recap { $recap{$_} //= {} for keys(%config); for my $h (keys(%recap)) { next if !exists($config{$h}); + my $vars = $protocols{opt('protocol', $h)}{variables}; # Only status variables are copied from `%recap` into `%config` because the recap should # not change the configuration. See the documenting comments for `%recap`. # TODO: Hard-coding this list impairs readability and maintainability. In particular, @@ -1648,6 +1649,7 @@ sub read_recap { # `$recap{$h}{'status-ipv4'}` directly. for my $v (qw(atime mtime wtime ipv4 ipv6 status-ipv4 status-ipv6 warned-min-interval warned-min-error-interval)) { + next if !$vars->{$v} || !$vars->{$v}{recap}; if (defined($recap{$h}{$v})) { $config{$h}{$v} = $recap{$h}{$v}; } else { diff --git a/t/read_recap.pl b/t/read_recap.pl index 240bb8b..cafabd3 100644 --- a/t/read_recap.pl +++ b/t/read_recap.pl @@ -143,7 +143,6 @@ my @test_cases = ( cachefile_lines => ["mtime=1234567890 host_b"], want => {host_b => {host => 'host_b'}}, want_TODO => "longstanding minor issue, doesn't affect functionality", - want_config_changes_TODO => "longstanding bug", }, { desc => "non-recap vars are scrubbed from %recap", @@ -151,7 +150,6 @@ my @test_cases = ( recap => {host_b => {host => 'host_b', mtime => 1234567891}}, want => {host_b => {host => 'host_b'}}, want_TODO => "longstanding minor issue, doesn't affect functionality", - want_config_changes_TODO => "longstanding minor issue, doesn't affect functionality", }, { desc => "unknown hosts are scrubbed from %recap",