fixing position for docker
This commit is contained in:
parent
965c76cfb1
commit
691584c46e
@ -121,6 +121,13 @@ pub fn secure_port(
|
||||
return Err("Err gathering secure port rule".into());
|
||||
}
|
||||
|
||||
let position = if docker && position.is_none() {
|
||||
let all_docker_rules = iptables.list("filter", &chain).unwrap();
|
||||
Some(all_docker_rules.len() as i32 - 1)
|
||||
} else {
|
||||
position
|
||||
};
|
||||
|
||||
let rule = rule.unwrap();
|
||||
if let Some(position) = position {
|
||||
insert_unique(&iptables, table, &chain, &rule, position)
|
||||
|
Loading…
x
Reference in New Issue
Block a user