summaryrefslogtreecommitdiff
path: root/packages/ddclient/patches/z3_duckdns-reply-fix.patch
diff options
context:
space:
mode:
authorIndrajit Raychaudhuri <irc@indrajit.com>2023-05-10 01:22:58 -0500
committerIndrajit Raychaudhuri <irc@indrajit.com>2023-06-04 04:36:19 -0500
commit9f3bed2a167463b18ea1389926a524e4b16e348c (patch)
tree9f6d26ffc21c7c60db9122017409ecda75ecfdd2 /packages/ddclient/patches/z3_duckdns-reply-fix.patch
parentd8188353f627eb8a4b928b1df25b98c4e2e8467a (diff)
downloadvyos-build-9f3bed2a167463b18ea1389926a524e4b16e348c.tar.gz
vyos-build-9f3bed2a167463b18ea1389926a524e4b16e348c.zip
dns: T5144: Create VyOS specific ddclient build with upstream fixes
This is VyOS specific build based on current Debian 3.10.0-3 with the following patches: - z1_perhost-variable-new-style.patch (see ddclient/ddclient#505) - z2_dyndns2-ipv4-ipv6.patch (see ddclient/ddclient#502) - z3_duckdns-reply-fix.patch (see ddclient/ddclient#506) - z4_dyndns2-multiline-multihost-fix.patch (see ddclient/ddclient#542)
Diffstat (limited to 'packages/ddclient/patches/z3_duckdns-reply-fix.patch')
-rw-r--r--packages/ddclient/patches/z3_duckdns-reply-fix.patch74
1 files changed, 74 insertions, 0 deletions
diff --git a/packages/ddclient/patches/z3_duckdns-reply-fix.patch b/packages/ddclient/patches/z3_duckdns-reply-fix.patch
new file mode 100644
index 00000000..ac51add9
--- /dev/null
+++ b/packages/ddclient/patches/z3_duckdns-reply-fix.patch
@@ -0,0 +1,74 @@
+From d35d62f3e753ffe15b151f7b7c5dea96bfa3ca7a Mon Sep 17 00:00:00 2001
+From: drinn <drinn@users.noreply.github.com>
+Date: Sat, 28 Jan 2023 09:48:51 -0600
+Subject: [PATCH 1/2] updated nic_duckdns_update to account for extra lines in
+ duckdns reply
+
+Ref: ddclient/ddclient#506
+---
+ ddclient.in | 30 +++++++++++++++++++++---------
+ 1 file changed, 21 insertions(+), 9 deletions(-)
+
+diff --git a/ddclient.in b/ddclient.in
+index eff10fb4..8797d7d4 100755
+--- a/ddclient.in
++++ b/ddclient.in
+@@ -6559,16 +6559,28 @@ sub nic_duckdns_update {
+ next if !header_ok($h, $reply);
+
+ my @reply = split /\n/, $reply;
+- my $returned = pop(@reply);
+- if ($returned =~ /OK/) {
+- $config{$h}{'ip'} = $ip;
+- $config{$h}{'mtime'} = $now;
+- $config{$h}{'status'} = 'good';
+- success("updating %s: good: IP address set to %s", $h, $ip);
+- } else {
+- $config{$h}{'status'} = 'failed';
+- failed("updating %s: Server said: '%s'", $h, $returned);
++ my $state = 'noresult';
++ my $line = '';
++
++ foreach $line (@reply) {
++ if ($line eq 'OK') {
++ $config{$h}{'ip'} = $ip;
++ $config{$h}{'mtime'} = $now;
++ $config{$h}{'status'} = 'good';
++ $state = 'result';
++ success("updating %s: good: IP address set to %s", $h, $ip);
++
++ } elsif ($line eq 'KO') {
++ $config{$h}{'status'} = 'failed';
++ $state = 'result';
++ failed("updating %s: Server said: '%s'", $h, $line);
++ }
++ }
++
++ if ($state eq 'noresult') {
++ failed("updating %s: Server said: '%s'", $h, $line);
+ }
++
+ }
+ }
+
+
+From dbc40557d22b36a6847d0cd11e59185647516f7b Mon Sep 17 00:00:00 2001
+From: drinn <drinn@users.noreply.github.com>
+Date: Sat, 28 Jan 2023 09:59:58 -0600
+Subject: [PATCH 2/2] removed empty space
+
+---
+ ddclient.in | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/ddclient.in b/ddclient.in
+index 8797d7d4..b818ea6e 100755
+--- a/ddclient.in
++++ b/ddclient.in
+@@ -6580,7 +6580,6 @@ sub nic_duckdns_update {
+ if ($state eq 'noresult') {
+ failed("updating %s: Server said: '%s'", $h, $line);
+ }
+-
+ }
+ }