qdm12 / ddns-updater

Container to update DNS records periodically with WebUI for many DNS providers
https://hub.docker.com/r/qmcgaw/ddns-updater/
MIT License
1.46k stars 146 forks source link

IPv6 update failed for No-IP DDNS #711

Closed NightFurySL2001 closed 1 month ago

NightFurySL2001 commented 1 month ago

Trying to update IPv6 record on noip.com and this error came up. Updating IPv4 record (changing configuration file to ipv4) works fine.

  1. Is this urgent: No
  2. DNS provider(s) you use: noip.com/ddns.net
  3. Program version:

Running version latest built on 2024-05-05T10:03:58.693Z (commit 093e815)

  1. What are you using to run the container: docker compose up
  2. Extra information (optional)

Logs:

2024-05-06T05:21:34Z INFO reading JSON config from file /updater/data/config.json
2024-05-06T05:21:34Z INFO Found single setting to update record
2024-05-06T05:21:34Z INFO Reading history from database: domain all.ddnskey.com host @ ipv6
2024-05-06T05:21:34Z INFO [backup] disabled
2024-05-06T05:21:34Z INFO [healthcheck server] listening on 127.0.0.1:9999
2024-05-06T05:21:34Z INFO [http server] listening on :8000
2024-05-06T05:21:36Z INFO ipv6 address of all.ddnskey.com is invalid IP and your ipv6 address  is 2001:e68:[redacted]
2024-05-06T05:21:36Z INFO Updating record [domain: all.ddnskey.com | host: @ | provider: noip | ip: ipv6] to use 2001:e68:[redacted]
panic: runtime error: index out of range [0] with length 0

goroutine 16 [running]:
github.com/qdm12/ddns-updater/internal/provider/providers/noip.(*Provider).Update(0xc00047c070, {0xed02e0, 0xc000420410}, 0xc0003e4d50, {{0x20010e68541abbbf, 0x7acae2ce41bb38c8}, 0xc000010030})
        github.com/qdm12/ddns-updater/internal/provider/providers/noip/provider.go:184 +0x13a5
github.com/qdm12/ddns-updater/internal/update.(*Updater).Update(0xc000491900, {0xed02e0, 0xc000420410}, 0x0, {{0x7acae2ce41bb38c8?, 0xd05947?}, 0xc000010030?})
        github.com/qdm12/ddns-updater/internal/update/update.go:48 +0x21d
github.com/qdm12/ddns-updater/internal/update.(*Runner).updateNecessary(0xc000304fc0, {0xed02e0, 0xc000420410})
        github.com/qdm12/ddns-updater/internal/update/service.go:315 +0xcdd
github.com/qdm12/ddns-updater/internal/update.(*Runner).Run(0xc000304fc0, {0xed02e0, 0xc000420410}, 0xc000470180?)
        github.com/qdm12/ddns-updater/internal/update/service.go:343 +0x133
created by main._main in goroutine 10
        ./main.go:260 +0x19af

Configuration file:

{
  "settings": [
    {
      "provider": "noip",
      "domain": "all.ddnskey.com",
      "host": "@",
      "username": "[redacted]@ddnskey.com",
      "password": "[redacted]",
      "ip_version": "ipv6",
      "provider_ip": true
    }
  ]
}

Host OS: Ubuntu 22.04

qdm12 commented 1 month ago

That was a bug, it's fixed in 542e89536c524cdb2215a48384af7ef6fad2c443 (it was due to "provider_ip": true). Thanks for reporting this!! 💯