public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
* Re: [PATCH v6 1/1] ddns: Add provider Feste-IP.Net
@ 2021-05-20 11:21 Michael Tremer
  2021-05-20 16:51 ` [PATCH] " Martin Krieger
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Tremer @ 2021-05-20 11:21 UTC (permalink / raw)
  To: development

[-- Attachment #1: Type: text/plain, Size: 5279 bytes --]

Hello,

> On 20 May 2021, at 12:02, Martin Krieger <makrie(a)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(a)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(a)posteo.de> wrote:
> 
> From 37fb0237932fb12bdd635e9cb5e01b0bf9f03dda Mon Sep 17 00:00:00 2001
> From: Martin Krieger <makrie(a)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(a)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.


^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: ddns add provider Feste-IP.NET
@ 2021-05-05 22:28 Michael Tremer
  2021-05-06 10:21 ` [PATCH] ddns: Add provider Feste-IP.Net Martin Krieger
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Tremer @ 2021-05-05 22:28 UTC (permalink / raw)
  To: development

[-- Attachment #1: Type: text/plain, Size: 1484 bytes --]

Hello Martin,

Thank you very much for your submission.

> On 5 May 2021, at 19:13, Martin Krieger <makrie(a)posteo.de> wrote:
> 
> diff --git a/README b/README
> index b6decb3..fa6ce5e 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 56e6620..c70423b 100644
> --- a/src/ddns/providers.py
> +++ b/src/ddns/providers.py
> @@ -1178,6 +1178,16 @@ class DDNSProviderEntryDNS(DDNSProvider):
>                # If we got here, some other update error happened.
>                raise DDNSUpdateError
> 
> +class DDNSProviderFesteIPNet(DDNSProtocolDynDNS2, DDNSProvider):
> +        handle    = "feste-ip.net"
> +        name      = "Feste-IP.Net"
> +        website   = "https//www.feste-ip.net/"

You are missing a “:” in the URL.

> +        protocols = ("ipv4",)

According to this documentation, the provider supports IPv6 as well:

  https://www.feste-ip.net/ddns-service/einrichtung/linux/

> +        # Information about the format of the request is to be found
> +        # https://www.feste-ip.net/ddns-service/allgemeine-informationen/
> +
> +        url = "https://members.feste-ip.net/nic/update"
> 
> class DDNSProviderFreeDNSAfraidOrg(DDNSProvider):
>        handle    = “freedns.afraid.org"
> 

Best,
-Michael

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-05-28 15:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <569B3659-E76C-484C-8A05-98A3A41AF2A2@posteo.de>
2021-05-18 21:39 ` [PATCH] ddns: Add provider Feste-IP.Net Signed-off-by: Martin Krieger <makrie@posteo.de> --- *IPv6 support included based on API description but not tested. *Test system is connected by VDSL with pure IPv4 (No IPv6 or dual stack). *Setup can handle IPv4, IPv6 or dual stack updates Peter Müller
2021-05-19 13:44   ` [PATCH] ddns: Add provider Feste-IP.Net Martin Krieger
2021-05-20 11:21 [PATCH v6 1/1] " Michael Tremer
2021-05-20 16:51 ` [PATCH] " Martin Krieger
2021-05-21  8:47   ` Michael Tremer
2021-05-28 15:09     ` Martin Krieger
  -- strict thread matches above, loose matches on Subject: below --
2021-05-05 22:28 ddns add provider Feste-IP.NET Michael Tremer
2021-05-06 10:21 ` [PATCH] ddns: Add provider Feste-IP.Net Martin Krieger
2021-05-06 15:08   ` Michael Tremer
2021-05-08 12:20     ` Martin Krieger
2021-05-11  9:44       ` Michael Tremer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox