Skip to content

Commit

Permalink
rc: don't check if DDNS IP matches nvram content when DDNS set to use…
Browse files Browse the repository at this point in the history
… external checks

Otherwise, this would constantly try to update the DDNS when in a dual NAT
or CGNAT situation where local WAN IP != real public IP.

We'd need to implement remote IP checks, however I'm not confortable
with having the watchdog constantly poll a remote server to check
the current IP, so for now external checks won't be monitored by
watchdog.
  • Loading branch information
RMerl committed Sep 7, 2018
1 parent 7c2b652 commit 911bc96
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions release/src/router/rc/watchdog.c
Expand Up @@ -5023,6 +5023,9 @@ void regular_ddns_check(void)
struct in_addr ip_addr;
struct hostent *hostinfo;

if (nvram_get_int("ddns_ipcheck") != 0) // Not relying on local wan0_ipaddr content
return;

//_dprintf("regular_ddns_check...\n");

hostinfo = gethostbyname(nvram_get("ddns_hostname_x"));
Expand Down

0 comments on commit 911bc96

Please sign in to comment.