Skip to content

Commit

Permalink
fix: deny/allow outgoing
Browse files Browse the repository at this point in the history
  • Loading branch information
ktmlm committed Nov 11, 2020
1 parent 9178fe2 commit c32d944
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/core/src/linux/nat/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,13 +270,18 @@ pub(crate) mod real {
loop {
asleep(2).await;
let args = mem::take(&mut *RULE_SET.lock());
let args_allow_fail =
mem::take(&mut *RULE_SET_ALLOW_FAIL.lock());

if !args.is_empty() {
POOL.spawn_ok(async move {
asleep(1).await;
info_omit!(nft_exec(dbg!(&args.join(""))));
});
}

let args_allow_fail =
mem::take(&mut *RULE_SET_ALLOW_FAIL.lock());
if !args_allow_fail.is_empty() {
POOL.spawn_ok(async move {
asleep(1).await;
args_allow_fail.iter().for_each(|arg| {
info_omit!(nft_exec(dbg!(&arg)));
})
Expand Down

0 comments on commit c32d944

Please sign in to comment.