Skip to content

Commit

Permalink
add direction in Firewall::validate_duplicate_rules comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
adgaultier committed Oct 9, 2024
1 parent efcf2c5 commit 7ea7f44
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions oryx-tui/src/section/firewall.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ impl Firewall {
fn validate_duplicate_rules(rules: &[FirewallRule], user_input: &UserInput) -> AppResult<()> {
if let Some(exiting_rule_with_same_ip) = rules.iter().find(|rule| {
rule.ip == IpAddr::from_str(user_input.ip.field.value()).unwrap()
&& rule.direction == user_input.direction
&& match user_input.id {
Some(uuid) => rule.id != uuid,
None => true,
Expand Down

0 comments on commit 7ea7f44

Please sign in to comment.