Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

luci-app-ddns - using custom option fails #4150

Closed
mavack opened this issue Jun 10, 2020 · 4 comments · Fixed by #4157
Closed

luci-app-ddns - using custom option fails #4150

mavack opened this issue Jun 10, 2020 · 4 comments · Fixed by #4157

Comments

@mavack
Copy link

mavack commented Jun 10, 2020

Trying to do a custom ddns server entry.

  1. When selecting new --Custom -- fill in all fields click save, the DDNS Service provider field defaults back to 3322.org (The first one on the list) (In r13247 it totally failed but looks like something changed slightly between versions)

  2. Both Custom update-URL and Custom update-script are mandatory fields, they are actually OR fields.
    https://openwrt.org/docs/guide-user/base-system/ddns

Trying to fill anything into the update-script field when only needing url triggers a failure.
203203 WARN : Custom update_script not found! - TERMINATE
203203 WARN : PID '10342' exit WITH ERROR '1' at 2020-06-10 20:32

manually updating the etc/config/ddns file and removing update-script resolves the ddns working

Using this with cloudns.net which use's an update URL only.

LuCI Master (git-20.160.76921-16f443b) / OpenWrt SNAPSHOT r13527-61307544d1

@jow-
Copy link
Contributor

jow- commented Jun 10, 2020

@Ansuel

Ansuel added a commit to Ansuel/luci that referenced this issue Jun 10, 2020
Fix broken Custom provider selection in luci-app-ddns.
Fixes: openwrt#4150

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
jow- added a commit that referenced this issue Jun 10, 2020
luci-app-ddns: Fix broken Custom provider select #4150
@mavack
Copy link
Author

mavack commented Jun 13, 2020

Confirmed 2. is fixed, however part 1. still remains.

When you have custom ddns provider configured, and you edit the config, the form pre-fills with config like it should, however the "DDNS Service provider [IPv4]" field defaults to 3322.org.

I would guess you are pulling service_name to populate this field but since custom ddns provider does not have a defined uci service_name it just defaults to the first on the list. If no service_name is returned then the field should display custom.

@Ansuel
Copy link
Member

Ansuel commented Jun 13, 2020 via email

@mavack
Copy link
Author

mavack commented Jun 30, 2020

Issue 1 is still not resolved,
Create new Custom DDNS provider
Save the config
go back to the ddns screen
click edit
The displayed configuration now defaults to provider showing 3322.org (first in the list) you need to change it back to custom before save.

luci-app-ddns - git-20.181.72449-1f89ee8 - LuCI Support for Dynamic DNS Client (ddns-scripts)

	o.cfgvalue = function(section_id) {
		return uci.get('ddns', section_id, 'service_name');
	}

A custom DNS provider does not have a defined service_name UCI attribute as such it cannot return/display "-- custom --"
o.value('-',"-- " + _("custom") + " --");

which is manually added to the list 2 lines above.

Need if uci.get return nothing then display custom. This may or may not work as not sure if there are other exceptions that could be broken by returning custom only when no service_name is found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants