|
|
@@ -81,9 +81,14 @@ public interface AppRuleDriver { |
|
|
|
|
|
|
|
static boolean isFlexRouteFqdn(RedisService redis, String ip, String fqdn) { |
|
|
|
final String key = REDIS_FLEX_LISTS + "~" + ip + REDIS_LIST_SUFFIX; |
|
|
|
final boolean found = redis.sismember_plaintext(key, fqdn); |
|
|
|
if (log.isErrorEnabled()) log.error("isFlexRouteFqdn("+ip+", "+fqdn+") == "+found+ "(key="+key+")"); |
|
|
|
return found; |
|
|
|
String check = fqdn; |
|
|
|
while (true) { |
|
|
|
final boolean found = redis.sismember_plaintext(key, check); |
|
|
|
if (found) return true; |
|
|
|
final int dotPos = check.indexOf('.'); |
|
|
|
check = check.substring(dotPos+1); |
|
|
|
if (!check.contains(".")) return false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
AppRuleDriver getNext(); |
|
|
|