From 3ff96b3cb24e42112519fd9a1bf359d81fc8f2c4 Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Sun, 29 Jan 2006 10:35:48 +0000 Subject: [PATCH] Fixing a small detection error --- mbtask/taskibc.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/mbtask/taskibc.c b/mbtask/taskibc.c index bf178acd..45252b7a 100644 --- a/mbtask/taskibc.c +++ b/mbtask/taskibc.c @@ -1781,21 +1781,26 @@ void receiver(struct servent *se) memcpy(&in, tp->h_addr, tp->h_length); if (strcmp(inet_ntoa(in), ipaddress) == 0) { /* - * Store the back resolved IP fqdn for reference and change the - * FQDN to the one from the setup, so we continue to use the - * dynamic FQDN. + * Test if the backresolved dynamic DNS name is changed, but exclude the + * initial value which is the same as the real server name. */ - if (strcmp(tnsl->resolved, hostname)) { - Syslog('r', "IBC: old resolved %s new resolved %s state %s", + if (strcmp(tnsl->resolved, hostname) && strcmp(tnsl->resolved, tnsl->server)) { + Syslog('r', "IBC: GrepThiz old resolved %s new resolved %s state %s", tnsl->resolved, hostname, ncsstate[tnsl->state]); /* * This would be the moment to reset this neighbour * Double check state: waitpwd or call ? */ } + /* + * Store the back resolved IP fqdn for reference and change the + * FQDN to the one from the setup, so we continue to use the + * dynamic FQDN. + */ + if (strcmp(tnsl->resolved, hostname)) + Syslog('r', "IBC: setting '%s' to dynamic dns '%s'", hostname, tnsl->server); strncpy(tnsl->resolved, hostname, 63); inlist = TRUE; - Syslog('r', "IBC: setting '%s' to dynamic dns '%s'", tnsl->resolved, tnsl->server); hostname = tnsl->server; break; }