diff --git a/src/rule/mod.rs b/src/rule/mod.rs index f57871f..9e6f3a4 100644 --- a/src/rule/mod.rs +++ b/src/rule/mod.rs @@ -175,6 +175,10 @@ pub struct NatRule { from: Endpoint, #[builder(default)] to: Endpoint, + #[builder(default)] + user: Uid, + #[builder(default)] + group: Gid, } impl NatRule { @@ -261,6 +265,8 @@ impl TryCopyTo for NatRule { self.from.try_copy_to(&mut pf_rule.src)?; self.to.try_copy_to(&mut pf_rule.dst)?; + self.user.copy_to(&mut pf_rule.uid); + self.group.copy_to(&mut pf_rule.gid); Ok(()) }