]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
More stuff for allowing hostnames in <bind> and <link> again - note there is a FIXME...
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Wed, 28 Jun 2006 10:59:47 +0000 (10:59 +0000)
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>
Wed, 28 Jun 2006 10:59:47 +0000 (10:59 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4076 e03df62e-2008-0410-955e-edbf42e46eb7

docs/inspircd.conf.example
src/modules/m_spanningtree.cpp

index 76ab8458feae80de4501178926ac94d3a9622539..df2c26aeeca02c8f1500a2fe84fc7b413d2b1ad1 100644 (file)
 # that server to operoverride modes. This should only be used for     #
 # services and protected oper servers!                                #
 #                                                                     #
 # that server to operoverride modes. This should only be used for     #
 # services and protected oper servers!                                #
 #                                                                     #
-# IMPORTANT NOTE: When specifying the ip address and/or host, the     #
-# server software will prioritize RESOLVED hostnames above ip         #
-# addresses, so for example if your target server resolves to a.b.com #
-# you MUST put a.b.com into your link block, and NOT the IP address   #
-# of a.b.com. The system uses reverse resolution.                     #
-#                                                                     #
 #    ____                _   _____ _     _       ____  _ _   _        #
 #   |  _ \ ___  __ _  __| | |_   _| |__ (_)___  | __ )(_) |_| |       #
 #   | |_) / _ \/ _` |/ _` |   | | | '_ \| / __| |  _ \| | __| |       #
 #    ____                _   _____ _     _       ____  _ _   _        #
 #   |  _ \ ___  __ _  __| | |_   _| |__ (_)___  | __ )(_) |_| |       #
 #   | |_) / _ \/ _` |/ _` |   | | | '_ \| / __| |  _ \| | __| |       #
          somaxconn="128"
          softlimit="128"
          operonlystats="oclgkz"
          somaxconn="128"
          softlimit="128"
          operonlystats="oclgkz"
-                operspywhois="no"
+         operspywhois="no"
          customversion=""
          maxtargets="20"
          hidesplits="no"
          customversion=""
          maxtargets="20"
          hidesplits="no"
index e15ac11b7f15cc94669c33992cafe5f1add3f106..44786923cd82b810d5cd71759fac51c004e4ca7f 100644 (file)
@@ -2705,6 +2705,7 @@ class TreeSocket : public InspSocket
                 * IPs for which we don't have a link block.
                 */
                bool found = false;
                 * IPs for which we don't have a link block.
                 */
                bool found = false;
+               char resolved_host[MAXBUF];
                vector<Link>::iterator i;
                for (i = LinkBlocks.begin(); i != LinkBlocks.end(); i++)
                {
                vector<Link>::iterator i;
                for (i = LinkBlocks.begin(); i != LinkBlocks.end(); i++)
                {
@@ -2713,6 +2714,17 @@ class TreeSocket : public InspSocket
                                found = true;
                                break;
                        }
                                found = true;
                                break;
                        }
+                       /* XXX: Fixme: blocks for a very short amount of time,
+                        * we should cache these on rehash/startup
+                        */
+                       if (CleanAndResolve(resolved_host,i->IPAddr.c_str(),true))
+                       {
+                               if (std::string(resolved_host) == ip)
+                               {
+                                       found = true;
+                                       break;
+                               }
+                       }
                }
                if (!found)
                {
                }
                if (!found)
                {