From 974bba4d93df8e2c03a170b5f1753f05947986f4 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Fri, 23 Aug 2024 23:55:09 -0400 Subject: [PATCH] update_nics: Don't set `wantip*` if they're all `undef` This helps keep `%config` "clean", which helps with testing and debugging. --- ddclient.in | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ddclient.in b/ddclient.in index 959f8a6..3d630fe 100755 --- a/ddclient.in +++ b/ddclient.in @@ -1483,13 +1483,12 @@ sub update_nics { $ip //= $ipv4 // $ipv6; $ipv4 //= $ip if is_ipv4($ip); $ipv6 //= $ip if is_ipv6($ip); - $config{$h}{'wantipv4'} = $ipv4; - $config{$h}{'wantipv6'} = $ipv6; - if (!$ipv4 && !$ipv6) { warning('unable to determine IP address'); next; } + $config{$h}{'wantipv4'} = $ipv4; + $config{$h}{'wantipv6'} = $ipv6; next if !nic_updateable($h); push @hosts, $h;