From 203bf12245d689e20d0a6b0cd838eaaf2af3ead6 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Sat, 13 Jul 2024 04:33:44 -0400 Subject: [PATCH] dyndns2: Improve readability of status parsing --- ddclient.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ddclient.in b/ddclient.in index c981b37..291b532 100755 --- a/ddclient.in +++ b/ddclient.in @@ -4081,9 +4081,9 @@ sub nic_dyndns2_update { failed("updating %s: Could not connect to %s.", $hosts, $groupcfg{'server'}); next; } - # bug #10: some dyndns providers does not return the IP so - # we can't use the returned IP - my ($status, $returnedips) = split / /, lc $line; + # The IP address normally comes after the status, but we ignore it. (Some services do not + # return the IP so we can't rely on it anyway.) + (my $status = $line) =~ s/ .*$//; if ($status eq 'nochg') { warning("updating %s: %s: %s", $hosts, $status, $errors{$status}); $status = 'good';