# HG changeset patch # User Marco Cirillo # Date 1315008748 0 # Node ID 8fe1b47c9bde08bbc8fd80901b2e0f202feeacd4 # Parent 10ff12fa82e2686724bf4390852269ccb26ce20a mod_s2s_never_encrypt_blacklist: add option to check for the dull s2s session ip (OpenFire bork bork). diff -r 10ff12fa82e2 -r 8fe1b47c9bde mod_s2s_never_encrypt_blacklist/mod_s2s_never_encrypt_blacklist.lua --- a/mod_s2s_never_encrypt_blacklist/mod_s2s_never_encrypt_blacklist.lua Fri Sep 02 23:36:22 2011 +0000 +++ b/mod_s2s_never_encrypt_blacklist/mod_s2s_never_encrypt_blacklist.lua Sat Sep 03 00:12:28 2011 +0000 @@ -1,13 +1,16 @@ -- Filter out servers which gets choppy and buggy when it comes to starttls. local bad_servers = module:get_option_set("tls_s2s_blacklist"); +local bad_servers_ip = module:get_option_set("tls_s2s_blacklist_ip"); local function disable_tls_for_baddies_in(event) - if bad_servers:contains(event.origin.to_host) then event.origin.conn.starttls = nil; end + if bad_servers:contains(event.origin.to_host) or bad_servers_ip:contains(event.origin.conn:ip()) + then event.origin.conn.starttls = nil; end end local function disable_tls_for_baddies_out(event) - if bad_servers:contains(event.origin.from_host) then event.origin.conn.starttls = nil; end + if bad_servers:contains(event.origin.from_host) or bad_servers_ip:contains(event.origin.conn:ip()) + then event.origin.conn.starttls = nil; end end module:hook("s2s-stream-features", disable_tls_for_baddies_out, 10)