ClearFoundation Tracker - ClearOS
View Issue Details
0000680ClearOSapp-syswatch - System Watchpublic2012-07-12 11:562012-09-19 14:40
bchambers 
user2 
normalmajoralways
closedno change required 
6.2.0 
6.2.0 Updates 
0000680: Dynamic DNS update fails if system is on a LAN segment
If ClearOS is not the gateway, receiving a public IP address, dynamic DNS updates will fail.

sub GetIp()...
..
.
if ( (defined($g_extifs{$extif}->{status}) && ($g_extifs{$extif}->{status} == $STATUS_OK)) &&
         (defined($g_extifs{$extif}->{use_get_ip}) && ($g_extifs{$extif}->{use_get_ip} eq $STATE_ENABLED)) &&
         ($config{use_get_ip} eq $STATE_ENABLED)
        ) {

Should be (please verify):

if ( (defined($g_extifs{$extif}->{status}) && ($g_extifs{$extif}->{status} == $STATUS_OK)) &&
         ((defined($g_extifs{$extif}->{use_get_ip}) && ($g_extifs{$extif}->{use_get_ip} eq $STATE_ENABLED)) ||
         ($config{use_get_ip} eq $STATE_ENABLED))
        ) {

Second two conditions should be grouped by paranthesis, and condition should be OR, not AND.
No tags attached.
Issue History
2012-07-12 11:56bchambersNew Issue
2012-07-12 11:56bchambersStatusnew => assigned
2012-07-12 11:56bchambersAssigned To => user2
2012-07-12 12:01bchambersStatusassigned => confirmed
2012-09-19 14:39user2Note Added: 0000564
2012-09-19 14:40user2Statusconfirmed => resolved
2012-09-19 14:40user2Resolutionopen => no change required
2012-09-19 14:40user2Statusresolved => closed

Notes
(0000564)
user2   
2012-09-19 14:39   
That's a tortured "if" statement! The "and" logic is intended. Both the interface and the configuration must have "getip" enabled. If the interface is on a public IP, syswatch won't bother using the getip tool. Yes, some folks may use real IPs behind NAT, but that's rare. Covering up for that bad practice would put a lot more stress on the SDN IP referrer tool. Ideally, the "or" logic would be in there though.