Added check to ignore Port value if Initiator is FALSE.
authorPatrik Weiskircher <pat@silcnet.org>
Sat, 1 May 2004 10:23:16 +0000 (10:23 +0000)
committerPatrik Weiskircher <pat@silcnet.org>
Sat, 1 May 2004 10:23:16 +0000 (10:23 +0000)
Remote router coudln't connect if Port was set.

apps/silcd/serverconfig.c

index 26e78ae9c6719a8fd71e17f16d3661d7687d78c6..45ef86f720ad91ca23d322d5379cc9c2fc8e5155 100644 (file)
@@ -1404,6 +1404,12 @@ static bool silc_server_config_check(SilcServerConfig config)
          "same host.", r->host));
       ret = FALSE;
     }
+
+    if (r->initiator == FALSE && r->port != 0) {
+      SILC_SERVER_LOG_WARNING(("\nWarning: Initiator is FALSE and Port is "
+                               "specified. Ignoring Port value."));
+      r->port = 0;
+    }
   }
 
   /* ServerConnection sanity checks */