Message ID | 54e378f2-ad73-9395-88ea-9436008fc6b7@posteo.de |
---|---|
State | Dropped |
Headers |
Return-Path: <development-bounces@lists.ipfire.org> Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4Fl4n24MVrz3wbk for <patchwork@web04.haj.ipfire.org>; Tue, 18 May 2021 18:49:58 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4Fl4n11bZ6z35Y; Tue, 18 May 2021 18:49:57 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4Fl4n10JxHz2xZt; Tue, 18 May 2021 18:49:57 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4Fl4mz10rgz2xZt for <development@lists.ipfire.org>; Tue, 18 May 2021 18:49:55 +0000 (UTC) Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.66]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPS id 4Fl4my1Pm2zZF for <development@lists.ipfire.org>; Tue, 18 May 2021 18:49:54 +0000 (UTC) Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id A8B192400FD for <development@lists.ipfire.org>; Tue, 18 May 2021 20:49:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1621363792; bh=6ACKHQZSyei6bUqSxYq7oXayeVYiR8+QkVsatT/RQ/Q=; h=To:From:Subject:Date:From; b=WTjDAhk2pu09DyP3Ihd4yHpeK4ypmoajuGPHn0ednrkKBxnO7ql0FQ+d6aiWnsePp OSJsaM9HZXRglSSbUg9ilWyt0Oj3v+L03WF9ohAwqcRltBj5m9UGLmhIi2tNgDha1U NHwoHnzPEUuPJZvHxhb1D/aqiyMeuVtGl5uXfWF/zA5GmmdNlBHQjsXS+2jvLto/S6 uzpbiKrhroCIezoat1C/UNbFPVGtSGlqyBWotEKuiWfHHfmlLrU/NI93k5DlwzhTom Hs3ZKfnDT+pOjymBxfshn8V8f3Gnk4B19dtBquYzQxoupO7WiXO3ABxPJUe+p9F7Hp gOVEpw+xKY45A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Fl4mv3RQ3z6tm4 for <development@lists.ipfire.org>; Tue, 18 May 2021 20:49:50 +0200 (CEST) To: development@lists.ipfire.org From: Martin Krieger <makrie@posteo.de> Subject: [PATCH v6 1/1] ddns: Add provider Feste-IP.Net Message-ID: <54e378f2-ad73-9395-88ea-9436008fc6b7@posteo.de> Date: Tue, 18 May 2021 18:49:35 +0000 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="shrUxWnXJjDsA7XzLFMdL1BVTGrh2aR1h" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.ipfire.org; s=202003rsa; t=1621363794; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:dkim-signature; bh=n39dm9Cr/U5VdcvA8TASoEREn9EMUI3U+5/jNoFVQks=; b=LxMO0G/VOJtmaZcOC4BuwTwoxD8vZyjBWnti38u3RKHVWjOuji0cxssyxVL2SZRawGFr07 TbJOUExoXHuOiXf2Yb23j5YAJGvT2461hvrEKCvBazHyWqr+HufdbgOqFO8PhSta84SeTm 7upQSVewrvVZquYRDZ4muZC1isOc88Deo970Qin8QmKFdWdT9tn0N+9GGygtnFLVw26Pov ETmtI36CRhQ+Yr2rK9WDECIHu9+f3HQS1QlmnL7f4JKa2UU8NeoguMGxVemH3hU6WJZgv6 E6cIbUi4Tra5Lp113zjMBKWnpRp0s9QiRyMzrh88AA5CifOa9jvZhU1ww/tZlg== ARC-Authentication-Results: i=1; mail01.ipfire.org; dkim=pass header.d=posteo.de header.s=2017 header.b=WTjDAhk2; spf=pass (mail01.ipfire.org: domain of makrie@posteo.de designates 185.67.36.66 as permitted sender) smtp.mailfrom=makrie@posteo.de ARC-Seal: i=1; s=202003rsa; d=lists.ipfire.org; t=1621363794; a=rsa-sha256; cv=none; b=uUDJJAB/hHnqsixdVgqq+A/15Ja3co0egOYa74K5NbI7ZQFhzODFEAYrySPZt9g/UacfEh fJ2WXjJ2zyUNYjRv+z2Ta6YKA5S2130YmttmeLnN4dN3EAwS1TwyngiOSxSsyqEADZxxcN IZn8ga91eAXvCirwXnNksqc9Grt7AeP8ZiLrzFRtARAT1qDm1fJjvZShQtK2sHC120va3Z qCZEBRw6jWvw+5wsIG34NbQMSeYW8E6yO7LS2FBCmOFQH02JCD47EvEL1eHT/Yp67LIk8p Eo7GErP8fDaKTykXl5Vb2Fs+7WknoCg+vgMQOcTs1l68XGLzU6dckpSLi8khsA== X-Rspamd-Server: mail01.haj.ipfire.org X-Spamd-Result: default: False [-9.10 / 11.00]; HAS_REPLYTO(0.00)[makrie@posteo.de]; RCVD_VIA_SMTP_AUTH(0.00)[]; IP_REPUTATION_HAM(-0.37)[asn: 8495(-0.37), country: DE(-0.01), ip: 185.67.36.66(0.00)]; R_SPF_ALLOW(-0.20)[+ip4:185.67.36.0/23]; HAS_ATTACHMENT(0.00)[]; REPLYTO_ADDR_EQ_FROM(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_DKIM_ARC_DNSWL_MED(-0.50)[]; ARC_SIGNED(0.00)[lists.ipfire.org:s=202003rsa:i=1]; RCVD_COUNT_THREE(0.00)[3]; MX_GOOD(-0.01)[]; DKIM_TRACE(0.00)[posteo.de:+]; DMARC_POLICY_ALLOW(-0.50)[posteo.de,none]; RCVD_IN_DNSWL_MED(-0.20)[185.67.36.66:from]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:+,3:~]; ASN(0.00)[asn:8495, ipnet:185.67.36.0/23, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; BAYES_HAM(-3.00)[99.99%]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[posteo.de:s=2017]; FROM_HAS_DN(0.00)[]; SPF_REPUTATION_HAM(-0.92)[-0.92227019375319]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.20)[multipart/signed,multipart/mixed,text/plain]; PREVIOUSLY_DELIVERED(0.00)[development@lists.ipfire.org]; RCPT_COUNT_ONE(0.00)[1]; DWL_DNSWL_LOW(-1.00)[posteo.de:dkim]; RWL_MAILSPIKE_VERYGOOD(0.00)[185.67.36.66:from]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4Fl4my1Pm2zZF Authentication-Results: mail01.ipfire.org; dkim=pass header.d=posteo.de header.s=2017 header.b=WTjDAhk2; dmarc=pass (policy=none) header.from=posteo.de; spf=pass (mail01.ipfire.org: domain of makrie@posteo.de designates 185.67.36.66 as permitted sender) smtp.mailfrom=makrie@posteo.de X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk <development.lists.ipfire.org> List-Unsubscribe: <https://lists.ipfire.org/mailman/options/development>, <mailto:development-request@lists.ipfire.org?subject=unsubscribe> List-Archive: <http://lists.ipfire.org/pipermail/development/> List-Post: <mailto:development@lists.ipfire.org> List-Help: <mailto:development-request@lists.ipfire.org?subject=help> List-Subscribe: <https://lists.ipfire.org/mailman/listinfo/development>, <mailto:development-request@lists.ipfire.org?subject=subscribe> Reply-To: makrie@posteo.de Errors-To: development-bounces@lists.ipfire.org Sender: "Development" <development-bounces@lists.ipfire.org> |
Series |
[v6,1/1] ddns: Add provider Feste-IP.Net
|
|
Commit Message
Martin Krieger
May 18, 2021, 6:49 p.m. UTC
From 37fb0237932fb12bdd635e9cb5e01b0bf9f03dda Mon Sep 17 00:00:00 2001 From: Martin Krieger <makrie@posteo.de> Date: Tue, 18 May 2021 19:42:44 +0200 Subject: [PATCH v6 1/1] ddns: Add provider Feste-IP.Net Comments: Provider supports IPv4, IPv6 & DS (Dual-Stack) Changelog: 18.05.2021 Improved failure handling. IPv6 & DS still not checked, because my network connection is pure IPv4. 17.05.2021 5th attempt ([PATCH v5 1/1]) 16.05.2021 4th attempt ([PATCH v4 1/1]) 08.05.2021 3rd attempt ([PATCH v3 1/1]) 06.05.2021 2nd attempt ([PATCH v2 1/1]) 05.05.2021 1st attempt ([PATCH v1 1/1]) Signed-off-by: Martin Krieger <makrie@posteo.de>.. --- README | 1 + src/ddns/providers.py | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+)
Comments
Hello Martin, Thanks for working on ddns, but *please* read Peter’s email. This is now the third patch (I don’t know why you are at number 6 already) and the idea of the review process is to submit something that at least works. You can ask all sorts of questions about anything you need to know, but you will have to listen to what people answer. This patch is fundamentally broken. I will comment on that further below. Secondly, we cannot even think about merging something that isn’t tested at all. So I would urge you to look at any of the other providers, because what you are trying to implement has already been implemented here for example: https://git.ipfire.org/?p=ddns.git;a=blob;f=src/ddns/providers.py;h=56e6620c78ab3d9de1c945147f86e70a8d8614d7;hb=HEAD#l975 @Stefan: We might want to have a class variable in the DynDNS protocol that adds the IPv6 address to a field that is named in that variable. That way, we avoid any code duplication. > On 18 May 2021, at 19:49, Martin Krieger <makrie@posteo.de> wrote: > > From 37fb0237932fb12bdd635e9cb5e01b0bf9f03dda Mon Sep 17 00:00:00 2001 > From: Martin Krieger <makrie@posteo.de> > Date: Tue, 18 May 2021 19:42:44 +0200 > Subject: [PATCH v6 1/1] ddns: Add provider Feste-IP.Net > > Comments: > Provider supports IPv4, IPv6 & DS (Dual-Stack) > > Changelog: > > 18.05.2021 > Improved failure handling. > IPv6 & DS still not checked, because my network connection is pure IPv4. > > 17.05.2021 > 5th attempt ([PATCH v5 1/1]) > > 16.05.2021 > 4th attempt ([PATCH v4 1/1]) > > 08.05.2021 > 3rd attempt ([PATCH v3 1/1]) > > 06.05.2021 > 2nd attempt ([PATCH v2 1/1]) > > 05.05.2021 > 1st attempt ([PATCH v1 1/1]) > > Signed-off-by: Martin Krieger <makrie@posteo.de>.. > --- > README | 1 + > src/ddns/providers.py | 31 +++++++++++++++++++++++++++++++ > 2 files changed, 32 insertions(+) > > diff --git a/README b/README > index b6decb35c338..fa6ce5e598b8 100644 > --- a/README > +++ b/README > @@ -68,6 +68,7 @@ SUPPORTED PROVIDERS: > easydns.com > enom.com > entrydns.net > + feste-ip.net > freedns.afraid.org > inwx.com|de|at|ch|es > itsdns.de > diff --git a/src/ddns/providers.py b/src/ddns/providers.py > index 56e6620c78ab..b7e14482a0b1 100644 > --- a/src/ddns/providers.py > +++ b/src/ddns/providers.py > @@ -1179,6 +1179,37 @@ class DDNSProviderEntryDNS(DDNSProvider): > raise DDNSUpdateError > > > +class DDNSProviderFesteIPNet(DDNSProtocolDynDNS2, DDNSProvider): > + handle = "feste-ip.net" > + name = "Feste-IP.Net" > + website = "https://www.feste-ip.net/" > + > + # Information about the format of the request is to be found > + # https://forum.feste-ip.net/viewtopic.php?f=13&t=469 > + > + myips = ("myip","myip2") > + > + url = "https://members.feste-ip.net/nic/update/" > + > + def update(self): > + data = { > + "hostname" : self.hostname > + } > + > + for proto in DDNSProvider.protocols: > + idx = 0 > + tmpip = self.get_address(proto) > + if tmpip: > + data[self.myips[idx]] = tmpip > + idx += 1 Setting idx is useless here. You will reset to zero in every iteration of the loop. Since it is being incremented last and then reset to zero, idx will *always* be zero. > + > + if self.myips[0] in data: > + self.send_request(data) > + return# You will only send one request here and only if it contains an IPv4 address. Why? What happens to systems that only have IPv6? -Michael > + > + raise DDNSUpdateError > + > + > class DDNSProviderFreeDNSAfraidOrg(DDNSProvider): > handle = "freedns.afraid.org" > name = "freedns.afraid.org" > -- > 2.31.0 > > >
Hello Michael, got it. You are right, sorry for confusion. But I really read the process description and have read your comments as well as looking in providers.py for examples. What should I do? Remove anything, improve it,...? Simply issue a request to you to implement that? One general question: Should a patch be send as uncommited diff from the staging area in before for revision instead of a commited one? Regards, Martin Krieger Am 20. Mai 2021 12:00:26 MESZ schrieb Michael Tremer <michael.tremer@ipfire.org>: >Hello Martin, > >Thanks for working on ddns, but *please* read Peter’s email. > >This is now the third patch (I don’t know why you are at number 6 >already) and the idea of the review process is to submit something that >at least works. You can ask all sorts of questions about anything you >need to know, but you will have to listen to what people answer. > >This patch is fundamentally broken. I will comment on that further >below. > >Secondly, we cannot even think about merging something that isn’t >tested at all. > >So I would urge you to look at any of the other providers, because what >you are trying to implement has already been implemented here for >example: > >https://git.ipfire.org/?p=ddns.git;a=blob;f=src/ddns/providers.py;h=56e6620c78ab3d9de1c945147f86e70a8d8614d7;hb=HEAD#l975 > >@Stefan: We might want to have a class variable in the DynDNS protocol >that adds the IPv6 address to a field that is named in that variable. >That way, we avoid any code duplication. > >> On 18 May 2021, at 19:49, Martin Krieger <makrie@posteo.de> wrote: >> >> From 37fb0237932fb12bdd635e9cb5e01b0bf9f03dda Mon Sep 17 00:00:00 >2001 >> From: Martin Krieger <makrie@posteo.de> >> Date: Tue, 18 May 2021 19:42:44 +0200 >> Subject: [PATCH v6 1/1] ddns: Add provider Feste-IP.Net >> >> Comments: >> Provider supports IPv4, IPv6 & DS (Dual-Stack) >> >> Changelog: >> >> 18.05.2021 >> Improved failure handling. >> IPv6 & DS still not checked, because my network connection is pure >IPv4. >> >> 17.05.2021 >> 5th attempt ([PATCH v5 1/1]) >> >> 16.05.2021 >> 4th attempt ([PATCH v4 1/1]) >> >> 08.05.2021 >> 3rd attempt ([PATCH v3 1/1]) >> >> 06.05.2021 >> 2nd attempt ([PATCH v2 1/1]) >> >> 05.05.2021 >> 1st attempt ([PATCH v1 1/1]) >> >> Signed-off-by: Martin Krieger <makrie@posteo.de>.. >> --- >> README | 1 + >> src/ddns/providers.py | 31 +++++++++++++++++++++++++++++++ >> 2 files changed, 32 insertions(+) >> >> diff --git a/README b/README >> index b6decb35c338..fa6ce5e598b8 100644 >> --- a/README >> +++ b/README >> @@ -68,6 +68,7 @@ SUPPORTED PROVIDERS: >> easydns.com >> enom.com >> entrydns.net >> + feste-ip.net >> freedns.afraid.org >> inwx.com|de|at|ch|es >> itsdns.de >> diff --git a/src/ddns/providers.py b/src/ddns/providers.py >> index 56e6620c78ab..b7e14482a0b1 100644 >> --- a/src/ddns/providers.py >> +++ b/src/ddns/providers.py >> @@ -1179,6 +1179,37 @@ class DDNSProviderEntryDNS(DDNSProvider): >> raise DDNSUpdateError >> >> >> +class DDNSProviderFesteIPNet(DDNSProtocolDynDNS2, DDNSProvider): >> + handle = "feste-ip.net" >> + name = "Feste-IP.Net" >> + website = "https://www.feste-ip.net/" >> + >> + # Information about the format of the request is to be found >> + # https://forum.feste-ip.net/viewtopic.php?f=13&t=469 >> + >> + myips = ("myip","myip2") >> + >> + url = "https://members.feste-ip.net/nic/update/" >> + >> + def update(self): >> + data = { >> + "hostname" : self.hostname >> + } >> + >> + for proto in DDNSProvider.protocols: >> + idx = 0 >> + tmpip = self.get_address(proto) >> + if tmpip: >> + data[self.myips[idx]] = tmpip >> + idx += 1 > >Setting idx is useless here. You will reset to zero in every iteration >of the loop. Since it is being incremented last and then reset to zero, >idx will *always* be zero. > >> + >> + if self.myips[0] in data: >> + self.send_request(data) >> + return# > >You will only send one request here and only if it contains an IPv4 >address. Why? What happens to systems that only have IPv6? > >-Michael > >> + >> + raise DDNSUpdateError >> + >> + >> class DDNSProviderFreeDNSAfraidOrg(DDNSProvider): >> handle = "freedns.afraid.org" >> name = "freedns.afraid.org" >> -- >> 2.31.0 >> >> >>
Hello, > On 20 May 2021, at 12:02, Martin Krieger <makrie@posteo.de> wrote: > > Hello Michael, > > got it. You are right, sorry for confusion. > > But I really read the process description and have read your comments as well as looking in providers.py for examples. > > What should I do? Remove anything, improve it,...? Yes, please improve the patch. If there is anything unclear, you should ask those questions first before sending a fixed version of that patch. > Simply issue a request to you to implement that? No, this won’t work because we don’t have an account with this provider to test it. > One general question: Should a patch be send as uncommited diff from the staging area in before for revision instead of a commited one? No, you should have a branch in your local git repository and commit to that. You can use “git commit —-amend” if you need to edit an existing commit. Best, -Michael > > Regards, > > Martin Krieger > > > > Am 20. Mai 2021 12:00:26 MESZ schrieb Michael Tremer <michael.tremer@ipfire.org>: > Hello Martin, > > Thanks for working on ddns, but *please* read Peter’s email. > > This is now the third patch (I don’t know why you are at number 6 already) and the idea of the review process is to submit something that at least works. You can ask all sorts of questions about anything you need to know, but you will have to listen to what people answer. > > This patch is fundamentally broken. I will comment on that further below. > > Secondly, we cannot even think about merging something that isn’t tested at all. > > So I would urge you to look at any of the other providers, because what you are trying to implement has already been implemented here for example: > > https://git.ipfire.org/?p=ddns.git;a=blob;f=src/ddns/providers.py;h=56e6620c78ab3d9de1c945147f86e70a8d8614d7;hb=HEAD#l975 > > @Stefan: We might want to have a class variable in the DynDNS protocol that adds the IPv6 address to a field that is named in that variable. That way, we avoid any code duplication. > > On 18 May 2021, at 19:49, Martin Krieger <makrie@posteo.de> wrote: > > From 37fb0237932fb12bdd635e9cb5e01b0bf9f03dda Mon Sep 17 00:00:00 2001 > From: Martin Krieger <makrie@posteo.de> > Date: Tue, 18 May 2021 19:42:44 +0200 > Subject: [PATCH v6 1/1] ddns: Add provider Feste-IP.Net > > Comments: > Provider supports IPv4, IPv6 & DS (Dual-Stack) > > Changelog: > > 18.05.2021 > Improved failure handling. > IPv6 & DS still not checked, because my network connection is pure IPv4. > > 17.05.2021 > 5th attempt ([PATCH v5 1/1]) > > 16.05.2021 > 4th attempt ([PATCH v4 1/1]) > > 08.05.2021 > 3rd attempt ([PATCH v3 1/1]) > > 06.05.2021 > 2nd attempt ([PATCH v2 1/1]) > > 05.05.2021 > 1st attempt ([PATCH v1 1/1]) > > Signed-off-by: Martin Krieger <makrie@posteo.de>.. > README | 1 + > src/ddns/providers.py | 31 +++++++++++++++++++++++++++++++ > 2 files changed, 32 insertions(+) > > diff --git a/README b/README > index b6decb35c338..fa6ce5e598b8 100644 > --- a/README > +++ b/README > @@ -68,6 +68,7 @@ SUPPORTED PROVIDERS: > easydns.com > enom.com > entrydns.net > + feste-ip.net > freedns.afraid.org > inwx.com|de|at|ch|es > itsdns.de > diff --git a/src/ddns/providers.py b/src/ddns/providers.py > index 56e6620c78ab..b7e14482a0b1 100644 > --- a/src/ddns/providers.py > +++ b/src/ddns/providers.py > @@ -1179,6 +1179,37 @@ class DDNSProviderEntryDNS(DDNSProvider): > raise DDNSUpdateError > > > +class DDNSProviderFesteIPNet(DDNSProtocolDynDNS2, DDNSProvider): > + handle = "feste-ip.net" > + name = "Feste-IP.Net" > + website = "https://www.feste-ip.net/" > + > + # Information about the format of the request is to be found > + # https://forum.feste-ip.net/viewtopic.php?f=13&t=469 > + > + myips = ("myip","myip2") > + > + url = "https://members.feste-ip.net/nic/update/" > + > + def update(self): > + data = { > + "hostname" : self.hostname > + } > + > + for proto in DDNSProvider.protocols: > + idx = 0 > + tmpip = self.get_address(proto) > + if tmpip: > + data[self.myips[idx]] = tmpip > + idx += 1 > > Setting idx is useless here. You will reset to zero in every iteration of the loop. Since it is being incremented last and then reset to zero, idx will *always* be zero. > > + > + if self.myips[0] in data: > + self.send_request(data) > + return# > > You will only send one request here and only if it contains an IPv4 address. Why? What happens to systems that only have IPv6? > > -Michael > > + > + raise DDNSUpdateError > + > + > class DDNSProviderFreeDNSAfraidOrg(DDNSProvider): > handle = "freedns.afraid.org" > name = "freedns.afraid.org" > -- > 2.31.0 > > > > > > -- > Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.
Hello Michael,
this is my latest improvement:
From c745be038550bf66f2c233ff9de1348bcfd99080 Mon Sep 17 00:00:00 2001
From: Martin Krieger <makrie@posteo.de>
Date: Tue, 18 May 2021 19:42:44 +0200
Subject: [PATCH] ddns: Add provider Feste-IP.Net
Provider supports IPv4, IPv6 & DS (Dual-Stack).
Required url parameter myip for IPv4 or IPv6.
Optional url parameter myip2 for DS which holds IPv4 or IPv6.
Url parameters myip & myip2 will not hold the same record type.
---
README | 1 +
src/ddns/providers.py | 40 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 41 insertions(+)
diff --git a/README b/README
index b6decb35c338..fa6ce5e598b8 100644
--- a/README
+++ b/README
@@ -68,6 +68,7 @@ SUPPORTED PROVIDERS:
easydns.com
enom.com
entrydns.net
+ feste-ip.net
freedns.afraid.org
inwx.com|de|at|ch|es
itsdns.de
diff --git a/src/ddns/providers.py b/src/ddns/providers.py
index 56e6620c78ab..8c6da69b6e50 100644
--- a/src/ddns/providers.py
+++ b/src/ddns/providers.py
@@ -1179,6 +1179,46 @@ class DDNSProviderEntryDNS(DDNSProvider):
raise DDNSUpdateError
+class DDNSProviderFesteIPNet(DDNSProtocolDynDNS2, DDNSProvider):
+ handle = "feste-ip.net"
+ name = "Feste-IP.Net"
+ website = "https://www.feste-ip.net/"
+
+ # Information about the format of the request is to be found
+ # https://forum.feste-ip.net/viewtopic.php?f=13&t=469
+
+ # myip is required and holds IPv4 or IPv6
+ # myip2 is optional for DS and holds IPv4 or Ipv6 but opposite record
type of myip
+ myips = ("myip","myip2")
+
+ url = "https://members.feste-ip.net/nic/update/"
+
+ def update(self):
+ data = {
+ "hostname" : self.hostname
+ }
+
+ # idx sets index of myips and checks for required url parameter myip
+ idx = 0
+ # Loop through DDNSProvider.protocols list
+ for proto in DDNSProvider.protocols:
+ idx = 0
+ tmpip = self.get_address(proto)
+ # Save only valid address response of protocol proto to the actual
url parameter...
+ # and increase idx
+ if tmpip:
+ data[self.myips[idx]] = tmpip
+ idx += 1
+
+ # Send DynDNS2 update request if the required url parameter myip is given
+ if idx:
+ self.send_request(data)
+ return
+
+ # Raise error if the required if the required url parameter myip gets
no valid address
+ raise DDNSUpdateError
+
+
class DDNSProviderFreeDNSAfraidOrg(DDNSProvider):
handle = "freedns.afraid.org"
name = "freedns.afraid.org"
Hello Martin, > On 20 May 2021, at 17:51, Martin Krieger <makrie@posteo.de> wrote: > > Hello Michael, > > this is my latest improvement: > > From c745be038550bf66f2c233ff9de1348bcfd99080 Mon Sep 17 00:00:00 2001 > From: Martin Krieger <makrie@posteo.de> > Date: Tue, 18 May 2021 19:42:44 +0200 > Subject: [PATCH] ddns: Add provider Feste-IP.Net > > Provider supports IPv4, IPv6 & DS (Dual-Stack). > Required url parameter myip for IPv4 or IPv6. > Optional url parameter myip2 for DS which holds IPv4 or IPv6. > Url parameters myip & myip2 will not hold the same record type. > --- > README | 1 + > src/ddns/providers.py | 40 ++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 41 insertions(+) > > diff --git a/README b/README > index b6decb35c338..fa6ce5e598b8 100644 > --- a/README > +++ b/README > @@ -68,6 +68,7 @@ SUPPORTED PROVIDERS: > easydns.com > enom.com > entrydns.net > + feste-ip.net > freedns.afraid.org > inwx.com|de|at|ch|es > itsdns.de > diff --git a/src/ddns/providers.py b/src/ddns/providers.py > index 56e6620c78ab..8c6da69b6e50 100644 > --- a/src/ddns/providers.py > +++ b/src/ddns/providers.py > @@ -1179,6 +1179,46 @@ class DDNSProviderEntryDNS(DDNSProvider): > raise DDNSUpdateError > > > +class DDNSProviderFesteIPNet(DDNSProtocolDynDNS2, DDNSProvider): > + handle = "feste-ip.net" > + name = "Feste-IP.Net" > + website = "https://www.feste-ip.net/" > + > + # Information about the format of the request is to be found > + # https://forum.feste-ip.net/viewtopic.php?f=13&t=469 > + > + # myip is required and holds IPv4 or IPv6 > + # myip2 is optional for DS and holds IPv4 or Ipv6 but opposite record type of myip > + myips = ("myip","myip2") > + > + url = "https://members.feste-ip.net/nic/update/" > + > + def update(self): > + data = { > + "hostname" : self.hostname > + } > + > + # idx sets index of myips and checks for required url parameter myip > + idx = 0 > + # Loop through DDNSProvider.protocols list > + for proto in DDNSProvider.protocols: > + idx = 0 > + tmpip = self.get_address(proto) > + # Save only valid address response of protocol proto to the actual url parameter... > + # and increase idx > + if tmpip: > + data[self.myips[idx]] = tmpip > + idx += 1 > + > + # Send DynDNS2 update request if the required url parameter myip is given > + if idx: > + self.send_request(data) > + return > + > + # Raise error if the required if the required url parameter myip gets no valid address > + raise DDNSUpdateError > + > + > class DDNSProviderFreeDNSAfraidOrg(DDNSProvider): > handle = "freedns.afraid.org" > name = "freedns.afraid.org" > -- > 2.31.0 > > Based on your correct comment idx = 0 was on the wrong line, it moved outside the loop over the protocols (IPv4 & IPv6). You ignored all technical advice that I have given to you. There are solutions already in the same file that you simply need to copy and paste. They are tested, clean and just work. Your implementation is not very Pythonic and raises a random error if no IP address could be determined. > Pure IPv4 is tested & works as expected. As stated several times I have no option to test IPv6 and DS on my system. > > The provider serves a test possibility (https://www.feste-ip.net/ddns-service/faq-ddns/): > > "Kann Ich den Dienst testen ohne mich extra anzumelden? > Ja. Um zu testen ob Ihr Router bzw. Ihr Updateclient mit unserem Dienst funktioniert können Sie folgende Testdaten verwenden: > > DNS-Name: test.feste-ip.net > HOST-ID : 13135 > Passwort: 7sN2KS6L8W > > Bitte beachten Sie dass diese Daten u.U. von mehreren Testern verwendet werden. > Ob Ihr Update erfolgreich war können Sie mit der zeitnahen Eingabe von "nslookup -query=txt test.feste-ip.net" prüfen." > > Could please anybody in the development-team who has the right technical conditions (IPv6 or DS) do test for these cases? That would be nice. Thanks. > > Should I mark my faulty patch on the ipfire git server as superseded? Yes, please. > Regards, > > Martin Krieger > > Michael Tremer: >> Hello, >>> On 20 May 2021, at 12:02, Martin Krieger <makrie@posteo.de> wrote: >>> >>> Hello Michael, >>> >>> got it. You are right, sorry for confusion. >>> >>> But I really read the process description and have read your comments as well as looking in providers.py for examples. >>> >>> What should I do? Remove anything, improve it,...? >> Yes, please improve the patch. If there is anything unclear, you should > ask those questions first before sending a fixed version of that patch. >>> Simply issue a request to you to implement that? >> No, this won’t work because we don’t have an account with this provider to test it. >>> One general question: Should a patch be send as uncommited diff from the staging area in before for revision instead of a commited one? >> No, you should have a branch in your local git repository and commit to > that. You can use “git commit —-amend” if you need to edit an existing commit. >> Best, >> -Michael >>> >>> Regards, >>> >>> Martin Krieger >>> >>> >>> >>> Am 20. Mai 2021 12:00:26 MESZ schrieb Michael Tremer <michael.tremer@ipfire.org>: >>> Hello Martin, >>> >>> Thanks for working on ddns, but *please* read Peter’s email. >>> >>> This is now the third patch (I don’t know why you are at number 6 already) and the idea of the review process is to submit something that at least works. You can ask all sorts of questions about anything you need to know, but you will have to listen to what people answer. >>> >>> This patch is fundamentally broken. I will comment on that further below. >>> >>> Secondly, we cannot even think about merging something that isn’t tested at all. >>> >>> So I would urge you to look at any of the other providers, because what you are trying to implement has already been implemented here for example: >>> >>> https://git.ipfire.org/?p=ddns.git;a=blob;f=src/ddns/providers.py;h=56e6620c78ab3d9de1c945147f86e70a8d8614d7;hb=HEAD#l975 >>> >>> @Stefan: We might want to have a class variable in the DynDNS protocol > that adds the IPv6 address to a field that is named in that variable. That way, we avoid any code duplication. >>> >>> On 18 May 2021, at 19:49, Martin Krieger <makrie@posteo.de> wrote: >>> >>> From 37fb0237932fb12bdd635e9cb5e01b0bf9f03dda Mon Sep 17 00:00:00 2001 >>> From: Martin Krieger <makrie@posteo.de> >>> Date: Tue, 18 May 2021 19:42:44 +0200 >>> Subject: [PATCH v6 1/1] ddns: Add provider Feste-IP.Net >>> >>> Comments: >>> Provider supports IPv4, IPv6 & DS (Dual-Stack) >>> >>> Changelog: >>> >>> 18.05.2021 >>> Improved failure handling. >>> IPv6 & DS still not checked, because my network connection is pure IPv4. >>> >>> 17.05.2021 >>> 5th attempt ([PATCH v5 1/1]) >>> >>> 16.05.2021 >>> 4th attempt ([PATCH v4 1/1]) >>> >>> 08.05.2021 >>> 3rd attempt ([PATCH v3 1/1]) >>> >>> 06.05.2021 >>> 2nd attempt ([PATCH v2 1/1]) >>> >>> 05.05.2021 >>> 1st attempt ([PATCH v1 1/1]) >>> >>> Signed-off-by: Martin Krieger <makrie@posteo.de>.. >>> README | 1 + >>> src/ddns/providers.py | 31 +++++++++++++++++++++++++++++++ >>> 2 files changed, 32 insertions(+) >>> >>> diff --git a/README b/README >>> index b6decb35c338..fa6ce5e598b8 100644 >>> --- a/README >>> +++ b/README >>> @@ -68,6 +68,7 @@ SUPPORTED PROVIDERS: >>> easydns.com >>> enom.com >>> entrydns.net >>> + feste-ip.net >>> freedns.afraid.org >>> inwx.com|de|at|ch|es >>> itsdns.de >>> diff --git a/src/ddns/providers.py b/src/ddns/providers.py >>> index 56e6620c78ab..b7e14482a0b1 100644 >>> --- a/src/ddns/providers.py >>> +++ b/src/ddns/providers.py >>> @@ -1179,6 +1179,37 @@ class DDNSProviderEntryDNS(DDNSProvider): >>> raise DDNSUpdateError >>> >>> >>> +class DDNSProviderFesteIPNet(DDNSProtocolDynDNS2, DDNSProvider): >>> + handle = "feste-ip.net" >>> + name = "Feste-IP.Net" >>> + website = "https://www.feste-ip.net/" >>> + >>> + # Information about the format of the request is to be found >>> + # https://forum.feste-ip.net/viewtopic.php?f=13&t=469 >>> + >>> + myips = ("myip","myip2") >>> + >>> + url = "https://members.feste-ip.net/nic/update/" >>> + >>> + def update(self): >>> + data = { >>> + "hostname" : self.hostname >>> + } >>> + >>> + for proto in DDNSProvider.protocols: >>> + idx = 0 >>> + tmpip = self.get_address(proto) >>> + if tmpip: >>> + data[self.myips[idx]] = tmpip >>> + idx += 1 >>> >>> Setting idx is useless here. You will reset to zero in every iteration > of the loop. Since it is being incremented last and then reset to zero, idx will *always* be zero. >>> >>> + >>> + if self.myips[0] in data: >>> + self.send_request(data) >>> + return# >>> >>> You will only send one request here and only if it contains an IPv4 address. Why? What happens to systems that only have IPv6? >>> >>> -Michael >>> >>> + >>> + raise DDNSUpdateError >>> + >>> + >>> class DDNSProviderFreeDNSAfraidOrg(DDNSProvider): >>> handle = "freedns.afraid.org" >>> name = "freedns.afraid.org" >>> -- >>> 2.31.0 >>> >>> >>> >>> >>> >>> -- >>> Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet. >
Hello Michael,
I hope this will leave the path of ignoring *any* technical advice.
The (re-)definition of list providers in the derived class seems to be
not necessary. Am I right?
Anything left or maybe simply misunderstood by me?
Regards,
Martin Krieger
From 2e0f9067d04d6250b476a1cb6e5224ba8d91be70 Mon Sep 17 00:00:00 2001
From: Martin Krieger <makrie@posteo.de>
Date: Tue, 18 May 2021 19:42:44 +0200
Subject: [PATCH] ddns: Add provider Feste-IP.Net
Provider Feste-IP.Net addapted from class DDNSProviderDesecIO
---
README | 1 +
src/ddns/providers.py | 29 +++++++++++++++++++++++++++++
2 files changed, 30 insertions(+)
diff --git a/README b/README
index b6decb35c338..fa6ce5e598b8 100644
--- a/README
+++ b/README
@@ -68,6 +68,7 @@ SUPPORTED PROVIDERS:
easydns.com
enom.com
entrydns.net
+ feste-ip.net
freedns.afraid.org
inwx.com|de|at|ch|es
itsdns.de
diff --git a/src/ddns/providers.py b/src/ddns/providers.py
index 56e6620c78ab..e274fb4f7262 100644
--- a/src/ddns/providers.py
+++ b/src/ddns/providers.py
@@ -1179,6 +1179,35 @@ class DDNSProviderEntryDNS(DDNSProvider):
raise DDNSUpdateError
+class DDNSProviderFesteIPNet(DDNSProtocolDynDNS2, DDNSProvider):
+ handle = "feste-ip.net"
+ name = "Feste-IP.Net"
+ website = "https://www.feste-ip.net/"
+ # protocols = ("ipv6", "ipv4",)
+
+ # Information about the format of the request is to be found
+ # https://forum.feste-ip.net/viewtopic.php?f=13&t=469
+ # ipv4 / ipv6 records are automatically removed when the update
+ # request originates from the respectively other protocol and no
+ # address is explicitly provided for the unused protocol.
+
+ url = "https://members.feste-ip.net/nic/update/"
+
+ # feste-ip.net sends the IPv6 and IPv4 address in one request
+
+ def update(self):
+ data = DDNSProtocolDynDNS2.prepare_request_data(self,
"ipv4")
+
+ # This one supports IPv6
+ myip2 = self.get_address("ipv6")
+
+ # Add update information if we have an IPv6 address.
+ if myip2:
+ data["myip2"] = myip2
+
+ self.send_request(data)
+
+
class DDNSProviderFreeDNSAfraidOrg(DDNSProvider):
handle = "freedns.afraid.org"
name = "freedns.afraid.org"
diff --git a/README b/README index b6decb35c338..fa6ce5e598b8 100644 --- a/README +++ b/README @@ -68,6 +68,7 @@ SUPPORTED PROVIDERS: easydns.com enom.com entrydns.net + feste-ip.net freedns.afraid.org inwx.com|de|at|ch|es itsdns.de diff --git a/src/ddns/providers.py b/src/ddns/providers.py index 56e6620c78ab..b7e14482a0b1 100644 --- a/src/ddns/providers.py +++ b/src/ddns/providers.py @@ -1179,6 +1179,37 @@ class DDNSProviderEntryDNS(DDNSProvider): raise DDNSUpdateError +class DDNSProviderFesteIPNet(DDNSProtocolDynDNS2, DDNSProvider): + handle = "feste-ip.net" + name = "Feste-IP.Net" + website = "https://www.feste-ip.net/" + + # Information about the format of the request is to be found + # https://forum.feste-ip.net/viewtopic.php?f=13&t=469 + + myips = ("myip","myip2") + + url = "https://members.feste-ip.net/nic/update/" + + def update(self): + data = { + "hostname" : self.hostname + } + + for proto in DDNSProvider.protocols: + idx = 0 + tmpip = self.get_address(proto) + if tmpip: + data[self.myips[idx]] = tmpip + idx += 1 + + if self.myips[0] in data: + self.send_request(data) + return + + raise DDNSUpdateError + + class DDNSProviderFreeDNSAfraidOrg(DDNSProvider): handle = "freedns.afraid.org" name = "freedns.afraid.org"