From eebb1b8a47fd30ba7fa0ef7076d75992b1cf63fe Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Thu, 30 May 2024 16:19:41 -0400 Subject: [PATCH 1/4] dnsexit2: Delete redundant `status-ipv*` assignments --- ddclient.in | 2 -- 1 file changed, 2 deletions(-) diff --git a/ddclient.in b/ddclient.in index c9bb379..fa2512b 100755 --- a/ddclient.in +++ b/ddclient.in @@ -4250,8 +4250,6 @@ sub nic_dnsexit2_update { info("Status: %s -- Message: %s", $status, $message); info("Server Message: %s -- Server Details: %s", $response->{'message'}, defined($response->{'details'}) ? $response->{'details'}[0] : "no details received"); - $config{$h}{'status-ipv4'} = $status if $ips{'4'}; - $config{$h}{'status-ipv6'} = $status if $ips{'6'}; if ($status ne 'good') { if ($status eq 'warning') { warning("%s", $message); From 6e5e2ab63f1f66a8558dd81ad5b48655930ce81d Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Thu, 30 May 2024 16:21:25 -0400 Subject: [PATCH 2/4] dnsexit2: Remove `https://` from update service URL This allows the `ssl` setting to control TLS vs. plain HTTP, and makes it possible to create a compatible service that doesn't use TLS (e.g., for testing). --- ddclient.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ddclient.in b/ddclient.in index fa2512b..7c490f3 100755 --- a/ddclient.in +++ b/ddclient.in @@ -4190,7 +4190,7 @@ sub nic_dnsexit2_update { ttl => $config{$h}{'ttl'}, }); }; - my $url = "https://$config{$h}{'server'}$config{$h}{'path'}"; + my $url = $config{$h}{'server'} . $config{$h}{'path'}; my $reply = geturl( proxy => opt('proxy'), url => $url, From d8a1449a19e9687fdf8ab1c9193284d4a1d421a6 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Thu, 30 May 2024 16:23:42 -0400 Subject: [PATCH 3/4] dnsexit2: Fix error message format string This fixes a bug introduced in commit 2bf6d348b088daf4abef16089e794af97ccf506f. --- ddclient.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ddclient.in b/ddclient.in index 7c490f3..1de2df5 100755 --- a/ddclient.in +++ b/ddclient.in @@ -4203,7 +4203,7 @@ sub nic_dnsexit2_update { }), ); unless ($reply && header_ok($h, $reply)) { - failed("updating %s: Could not connect to %s%s.", $h, $url); + failed("updating %s: Could not connect to %s", $h, $url); last; }; debug("%s", $reply); From 2a47b17541d2934a8d5afe27257da2cbbb20be1b Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Thu, 30 May 2024 16:26:44 -0400 Subject: [PATCH 4/4] dnsexit2: Include the unexpected status in the error message --- ddclient.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ddclient.in b/ddclient.in index 1de2df5..2cbd994 100755 --- a/ddclient.in +++ b/ddclient.in @@ -4258,7 +4258,7 @@ sub nic_dnsexit2_update { failed("%s", $message); failed("Server response: %s", $response->{'message'}); } else { - failed("This should not be possible"); + failed("Unexpected status: %s", $status); } next; }