Parcourir la source

defined another rule of host_name allowance

Paul Klumpp il y a 12 ans
Parent
commit
103bee2777
1 fichiers modifiés avec 5 ajouts et 2 suppressions
  1. 5 2
      em_server.rb

+ 5 - 2
em_server.rb

@@ -275,8 +275,11 @@ module InterconnectionPointProtocolHandler
               else
                 # if the resulting dns is too long, use ip-address instead.
                 # if the resulting dns has too many dots, use ip-address instead.
-                if host_name.length > 23 || host_name.split(".").size >= 4
-                  #put_log "cutting down host_name #{host_name} #{host_name.size} #{host_name.split(".").size}"
+                if host_name.length > 23 || host_name.split(".").size > 3 || host_name.grep(/\d/).size > 3
+                  #put_log "cutting down host_name: #{host_name}, because:"
+                  #put_log "#{host_name.length}"
+                  #put_log "#{host_name.split(".").size}"
+                  #put_log "#{host_name.grep(/\d/).size}"
 
                   host_name = iphost
                 end