From 273af1c82131fcdf1636559f30cc478f458e7885 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Fri, 23 Aug 2024 03:36:43 -0400 Subject: [PATCH] nic_updateable: Ignore non-recap vars when detecting config change --- ddclient.in | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/ddclient.in b/ddclient.in index 538af5b..e299a2e 100755 --- a/ddclient.in +++ b/ddclient.in @@ -3442,7 +3442,8 @@ EoEXAMPLE ###################################################################### sub nic_updateable { my ($host) = @_; - my $force_update = $protocols{opt('protocol', $host)}{force_update}; + my $protocol = $protocols{opt('protocol', $host)}; + my $force_update = $protocol->{force_update}; my $update = 0; my $ipv4 = $config{$host}{'wantipv4'}; my $ipv6 = $config{$host}{'wantipv6'}; @@ -3529,9 +3530,13 @@ sub nic_updateable { } elsif (defined($force_update) && $force_update->($host)) { $update = 1; - } elsif (my @changed = grep({ my $rv = $recap{$host}{$_}; my $cv = opt($_, $host); - defined($rv) && defined($cv) && $rv ne $cv; } - @recap_config_change_detection_vars)) { + } elsif (my @changed = grep({ + return 0 if (!$protocol->{variables}{$_} || + !$protocol->{variables}{$_}{recap}); + my $rv = $recap{$host}{$_}; + my $cv = opt($_, $host); + defined($rv) && defined($cv) && $rv ne $cv; + } @recap_config_change_detection_vars)) { info("update forced because options changed: " . join(', ', @changed)); $update = 1;