Missing inheritance for noip service settings
swthemathwiz opened this issue · comments
With ddclient 3.10 and 3.11.1, per host (service-level) settings seem to be ignored. A ddclient.conf with the line
usev4=ifv4, ifv4=ens4f0np0, protocol=noip, login=user, password=pw host.ddns.net
does not pick up the use/if information. But this conf works:
usev4=ifv4, ifv4=ens4f0np0
protocol=noip, login=user, password=pw host.ddns.net
There seems to be a missing inheritance issue (variable names not passed from opt->globals->config in the code). I added this, and it's working, but I don't know if it's what is needed:
--- ddclient.orig-3.11.1 2023-10-31 18:00:34.591821677 -0700
+++ ddclient 2023-10-31 18:00:52.467825277 -0700
@@ -818,6 +818,7 @@
'update' => \&nic_noip_update,
'examples' => \&nic_noip_examples,
'variables' => {
+ %{$variables{'service-common-defaults'}},
'atime' => setv(T_NUMBER, 0, 1, 0, undef),
'custom' => setv(T_BOOL, 0, 1, 0, undef),
'host' => setv(T_STRING, 1, 1, '', undef),
On first glance - the noip implementation is a few years old and seems to reimplement a lot of common settings from service-common-defaults
. However, it does not implement the updated *v4
variants that are part of the ongoing IPv6 support implementation.
As for why the multi-line version works - the config parsing is weird. Lines get accumulated into globals, lines with host definitions create a host-specific config with the globals at that point in the file copied into the host-config.
I think the line you added is the right fix for now, with additionally checking for any now-redundant redeclarations of the other config variables removed. The whole IP migration plus the provider updates will need to take a closer look at all of this anyways. Do you want to do a PR for it?
Pull request here (my first ever... seemed to go OK but checking recommended): #591