diff --git a/src/firewall/mod.rs b/src/firewall/mod.rs index e026bf7..947e0a3 100644 --- a/src/firewall/mod.rs +++ b/src/firewall/mod.rs @@ -60,7 +60,7 @@ pub fn block( // validate and send batch let finalized_batch = batch.finalize(); send_and_process(&finalized_batch)?; - if fwlen < &mut ips_add.len() { + if fwlen != &mut ips_add.len() { ret.push(format!("{length} ip in firewall", length = ips_add.len())); } *fwlen = ips_add.len(); diff --git a/src/ipblc/mod.rs b/src/ipblc/mod.rs index 2745c3b..ba2ecab 100644 --- a/src/ipblc/mod.rs +++ b/src/ipblc/mod.rs @@ -89,7 +89,7 @@ async fn listenpubsub(ctx: &Arc>, txpubsub: Sender, socke Some(ss) => { let msg = ss.strip_prefix(prefix.as_str()).unwrap(); let tosend: IpData = serde_json::from_str(msg).unwrap(); - if tosend.hostname != gethostname(true) { + if tosend.hostname != gethostname(true) || tosend.mode == "zmq".to_string() { txpubsub.send(tosend).await.unwrap(); } }