Ernillew / wl500g

Automatically exported from code.google.com/p/wl500g
0 stars 0 forks source link

HE DDNS change its diagnostic message, inadyn currently fails and should be fixed. #364

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Setup HE tunnel and fill HE DDNS fields in the router.
2. Reboot or run DDNS update by Update button (while address is new).
3. Reboot or run DDNS update (now second time, with the same address).

What is the expected output? What do you see instead?
I expect no fatal error and exiting inadyn just because the address is the 
same, it is not valid reason.

What I see instead:
Nov 14 06:52:29 inadyn[358]: Inadyn version 1.99.2 -- Dynamic DNS update client.
Nov 14 06:52:29 inadyn[358]: Failed resolving hostname NNNNN: Name or service 
not known
Nov 14 06:52:29 inadyn[358]: Checking for IP# change, querying interface ppp0
Nov 14 06:52:29 inadyn[358]: Update needed for alias NNNNN, new IP# N.N.N.N
Nov 14 06:52:29 inadyn[358]: Sending IP# update to DDNS server, connecting to 
ipv4.tunnelbroker.net(64.62.200.2)
Nov 14 06:52:30 inadyn[358]: Fatal error in DDNS server response:
Nov 14 06:52:30 inadyn[358]: [200 OK] -ERROR: This tunnel is already associated 
with this IP address.  Please try to limit your updates to IP changes.
Nov 14 06:52:30 inadyn[358]: Error response from DDNS server, exiting!
Nov 14 06:52:30 inadyn[358]: Failed starting daemon: RC_DYNDNS_RSP_NOTOK

What version of the product are you using?

RT-N16-1.9.2.7-rtn-r4667.trx

Please provide any additional information below.

HE change their response a bit and inadyn can't understand it properly now and 
exits. Look at the inadyn/src/dyndns.c function is_he_ipv6_server_rsp_ok():

if (strstr(p_rsp, p_self->info[infnr].my_ip_address.name) != NULL ||
                strstr(p_rsp, "already in use") != NULL)
                return RC_OK;

Now "already in use" is changed to "already associated" (see example above), so 
correct code will be:

if (strstr(p_rsp, p_self->info[infnr].my_ip_address.name) != NULL ||
                strstr(p_rsp, "already associated") != NULL)
                return RC_OK;

BTW, this problem can be deeper.
I don't understand why starting after boot or by Update button inadyn don't use 
its own cache at /var/run/inadyn/inadyn.cache which already contains the same 
address. Starting by hand from console with the same /etc/ddns.conf inadyn 
understand and use its cache so don't even ask HE for update.

Original issue reported on code.google.com by ache...@gmail.com on 14 Nov 2012 at 3:37

GoogleCodeExporter commented 9 years ago

Original comment by lly.dev on 14 Nov 2012 at 6:32

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Thank you for your report, I'll fix it ASAP.

Original comment by ad...@vampik.ru on 14 Nov 2012 at 3:18

GoogleCodeExporter commented 9 years ago
Inadyn don't use the cache when it runs the first time after boot. It's made 
intentionally in the new version - it should use a DNS request to verify the IP 
address the host is currently assigned to (we cannot rely on a cache file after 
the router was turned off, for example, you could manually change it).

Original comment by ad...@vampik.ru on 14 Nov 2012 at 3:25

GoogleCodeExporter commented 9 years ago

Original comment by ad...@vampik.ru on 14 Nov 2012 at 8:08